Hi,
we are currently starting to evaluate Castor for a project and have
implemented a simple program which just creates an object
(test.BusinessEvent) with two dependent objects (test.Attribute) in one
transaction and stores it - works ok.

Afterwards we query the DB (MySQL) using an OQL statement as follows:

 db.begin();
 OQLQuery q = db.getOQLQuery("SELECT b FROM test.BusinessEvent b WHERE id >
?");
 q.bind(0);
 QueryResults qr = q.execute();
 while (qr.hasMore()) {
    BusinessEvent b = (BusinessEvent)qr.next();
    System.out.println("BusinessEvent: "+b);
 }
 db.commit();

The query is issued in it's own transaction, and retrieves the objects
created before. Retrieving works fine, but  when commiting the transaction
all dependent objects are removed from the database!
The Logger (set with jdo.setLogWriter()) prints "Removing test.Attribute"
for all dependent objects of all BusinessEvents! Very strange...

Should it work? Are we doing something wrong?

Thanx in advance for your help!

Oliver

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to