users@glassfish.java.net

JPA Question : Deletion w.r.t One-to-many relation

From: <glassfish_at_javadesktop.org>
Date: Fri, 18 May 2007 07:44:41 PDT

Hi,

Am a newbie to Java Persistence API. In our database, we have a one-to-many relationship between 2 tables, say t1 & t2 i.e. one record of t1 can be associated with multiple records in table t2. Is it possible to delete a row in t2 without doing anything to the associated row in t1? Is this allowed in JPA? I heard that an error saying "parent is null' is thrown in such a case?

Thanks.
[Message sent by forum member 'raaga' (raaga)]

http://forums.java.net/jive/thread.jspa?messageID=217847