Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: 1.3.7
-
Fix Version/s: 2.3-M2
-
Component/s: None
-
Labels:None
-
Environment:Ubuntu 10.10 (or windows 7), java-6-sun-1.6.0.24 (or lower) STS 2.6.0 (or lower)
Description
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:
code.google.com/p/ezmanager
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
Servlet: grails
URI: /ezmanager/grails/project/update.dispatch
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
Class: ProjectController
I think this issue is very similar to the GRAILS-6388 (http://jira.codehaus.org/browse/GRAILS-6388)
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?
Best Regards
Michel
The PL/SQL script for creating the Oracle database is located at:
http://code.google.com/p/ezmanager/source/browse/trunk/database/database.infrastructure/database.scripts/ezManager.scripts.sql