Hello Tuan,

How are you handing referential integrity in your application? are you using
triggers or are you using referential contraints (cascade deletes) - Would
be helpful if you could post a bit more details about your data schema
definitions or/and a reproducible case...

Thanks, --francois

On 5/29/07, Tuan Nguyen Minh <[EMAIL PROTECTED]> wrote:

 Hi all,

I'm a new user of derby. I have a problem want to support:

When executing the statement



em.createQuery("delete from Subject").executeUpdate();



where Subject is in a many-to-many relationship with Book, and Subject owns the 
relationship,

one expects that the corresponding entry in the SUBJECT_BOOK table would be 
deleted.  This

happens when bulk deleting one-to-many relationships that are mapped with a 
join table, as

well as for *-to-one relationships mapped with a foreign key.  It also happens 
when individually

deleting objects.  However, it does not happen when bulk deleting the owning 
side of a many-to-many

relationship.



Thanks & best regards,

    Tuan Nguyen

Reply via email to