Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Duplicate column name with @Embedded and @AttributeOverrides


James Sutherland wrote:
> 
>>> protected RegistrationStatus jbackupStatus = RegistrationStatus.UNKNOWN;
> 
> This is not good, as all objects will share the exact same embeddable, but
> they should each have their own unique copy.  Otherwise a change to one of
> them, will affect them all.  Try using,
> 
> protected RegistrationStatus jbackupStatus = new
> RegistrationStatus(UNKNOWN);
> 

I lost many hours looking for some dark magic, but it was that simple.
Creating new instances instead of reusing static one solved my problem, I
can no longer reproduce it. Thank you very much for saving my sanity (it
haunted me for several days).
-- 
View this message in context: http://old.nabble.com/Duplicate-column-name-with-%40Embedded-and-%40AttributeOverrides-tp32370401p32382681.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top