Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Data Loss when using getter on a lazy, loaded @OneToMany Relationship

Am 09.02.2017 um 12:13 schrieb reinhard.girstenbrei@xxxxxxxxxx:
Hi Erhard,

by default an Entity with an Id of 0 or NULL means that it is a new object.

Therefore your code should persist a new object to the database.


definitely not. It is using an existing one. Cite from my post:

>> Master master = em.find(Master.class, 0);


--
Erhard Schwenk

Akkordeonjugend Baden-Württemberg - http://www.akkordeonjugend.de/
APAYA running System - http://www.apaya.net/


Back to the top