db-jdo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christiaan des Bouvrie" <c.des.Bouv...@CostEngineering.eu>
Subject Delete by query
Date Thu, 19 Jul 2007 10:42:46 GMT
I have a question regarding delete by query. In the JDO 2.0 spec 14.8 it

"...These methods delete the instances of affected classes that pass the
filter, and all dependent

instances...." To me it is not really clear what should be done in case
such instance contains a List attribute. 


Suppose I have the following class structure:

Book {
     List<Page> pages = new ArrayList<Page>(); 

     public void addPage(Page page) {


Page {


Three tables will be created, one of them is the relation table
Book_Pages. When I perform:
Query q = pm.newQuery(Book.class);

When deleting the book object, he rows in the relation table
corresponding to this book should be deleted as well. Should I specify
additional information in the .jdo or .orm to make this happen (eg.
delete-action="cascade" for the relation table), or should this be done
implicitly without specifying any additional info?


Kind regards,



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message