Affects Version/s: 1.3.7
Fix Version/s: None
Environment:Ubuntu 10.10 (or windows 7), java-6-sun-22.214.171.124 (or lower) STS 2.6.0 (or lower)
I created a Grails application based on an existing Oracle database.
The definition of all my domain classes (primary keys, field names) is mapped to reflect the exisiting database.
Basically I am not starting by designing myself new domain classes, they all already are predefined.
My project is open source and available at:
My context is the following:
I have a project domain classe (http://code.google.com/p/ezmanager/source/browse/trunk/project/ezmanager.grail_tomcat/grails-app/domain/ezmanager/domain/Project.groovy) which has a status field (http://code.google.com/p/ezmanager/source/browse/trunk/project/ezmanager.grail_tomcat/grails-app/domain/ezmanager/domain/BaseStatus.groovy).
When I try to change the status of an existing project (http://code.google.com/p/ezmanager/source/browse/trunk/project/ezmanager.grail_tomcat/grails-app/views/baseStatus/edit.gsp)
I get the following exception:
Error 500: Executing action [update] of controller [ezmanager.controllers.ProjectController] caused exception: identifier of an instance of ezmanager.domain.BaseStatus was altered from 1 to 5; nested exception is org.hibernate.HibernateException: identifier of an instance of ezmanager.domain.BaseStatus was altered from 1 to 5
Exception Message: identifier of an instance of ezmanager.domain.BaseStatus was altered from 1 to 5
Caused by: identifier of an instance of ezmanager.domain.BaseStatus was altered from 1 to 5
For your information, in the book Groovy in action (chapter 16: Seeing the Grails light), there is a kind of comparable exemple based on 2 classes TutorialEntry and Author; By analogy Project is equivalent to TutorialEntry and Status (BaseStatus) is equivalent to Author.
If I follow step by step the instructions (classe definition, generation of controllers and views), then I can without any difficulty change the Author of an TutorialEntry. It is working well because the database is designed by the developper. In my case, the database tables and table attributes have been imposed to the user.
Can you please help me to fix my issue?
Should I wait for the Grails Release 1.4M1?