anonymous wrote : Why is that? The entity is NOT detached, it never got persisted...
Well, you created it with "new", so it's not "attached" to the
persistence engine, so it has to be detached... It's probably not an accurate
message. persist() is for new rows, so it's probably not expecting ID to have a
value, assuming that if it does have a value, it must have been previously retrieved.
You've annotated your ID field with @GeneratedValue, so it's all or nothing.
Either remove it and always provide the ID, or keep it and never do. Mixing the scenarios
is a recipe for trouble anyway.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072529#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...