Re: Exception of merge method.

2009-07-14 Thread Michael Dick
Hi Yu, This is not expected behavior. You should be able to detach and merge your entity into a new persistence context. The error you're getting is because you have a value specified in a GeneratedField (ie in your entity you have @GeneratedValue on the field). The field in question is

Re: Exception of merge method.

2009-07-14 Thread wang yu
Hi mike, Yes, id field with @GeneratedValue(strategy=GenerationType.AUTO) annotation is the primary key field and I didn't serialize the entity. I just modified some fields of the entity in the same VM and try to merge the entity into a new context. Regards, Yu Wang On Tue, Jul 14, 2009 at 9:38