|
After I upgraded to 1.0.3 I encountered save error with my domain class. I got exception:
a different object with the same identifier value was already associated with the session: [Engine#1]; nested exception is org.hibernate.NonUniqueObjectException. Save method is ok when I use 1.0.1. Curiously enough, the list of the domain class shows the domain instance already saved and edit and update are ok. Is it a 1.0.3 problem? Thanks. -- 爱生活,爱FOX |
|
We'll need more info than that, such as example code etc.
Cheers On Thu, Jun 12, 2008 at 2:18 PM, Fox Woo <[hidden email]> wrote: > After I upgraded to 1.0.3 I encountered save error with my domain class. I > got exception: > a different object with the same identifier value was already associated > with the session: [Engine#1]; nested exception is > org.hibernate.NonUniqueObjectException. Save method is ok when I use 1.0.1. > Curiously enough, the list of the domain class shows the domain instance > already saved and edit and update are ok. Is it a 1.0.3 problem? Thanks. > > -- > 爱生活,爱FOX -- Graeme Rocher Grails Project Lead G2One, Inc. Chief Technology Officer http://www.g2one.com |
|
I found the error is related to seachabel plugin, after comment the code:
static searchable = { mainframeType component:true } in my domain class the behaviour is OK. I'll try to give a succinct code example to reproduce. 2008/6/12 Graeme Rocher <[hidden email]>: We'll need more info than that, such as example code etc. -- 爱生活,爱FOX |
|
class Mainframe {
String mainframeNumber MainframeType mainframeType static searchable = { mainframeType component:true } } class Engine extends Mainframe{ } class MainframeType{ String type } when I try to save engine, I got the exception. If I changed the code to searchable = true then everything is ok. I really need mainframeType be component so I tried to embed it but it doesn't seem to work. 2008/6/13 Fox Woo <[hidden email]>: I found the error is related to seachabel plugin, after comment the code: -- 爱生活,爱FOX |
|
---------- Forwarded message ---------- From: Fox Woo <[hidden email]> Date: 2008/6/14 Subject: Re: [grails-user] save error after upgrade to 1.0.3 To: [hidden email] class Mainframe { String mainframeNumber MainframeType mainframeType static searchable = { mainframeType component:true } } } class MainframeType{ String type } when I try to save engine, I got the exception. If I changed the code to searchable = true then everything is ok. I really need mainframeType be component so I tried to embed it but it doesn't seem to work. 2008/6/13 Fox Woo <[hidden email]>: I found the error is related to seachabel plugin, after comment the code: -- 爱生活,爱FOX -- 爱生活,爱FOX |
|
In reply to this post by Fox Woo
class Mainframe { -- 爱生活,爱FOX |
| Powered by Nabble | Edit this page |
