Hi Gunnar,

I will try to write a test case for your problem.
By the way, does your test pass when you switch back to old DList implementation class in OJB.properties?


regards,
Armin

Gunnar Hilling wrote:
Hello!

I got the following serious problem (RC5):

Using the following code, only one (the last) of the "Zertifikat"-Objects
is updated (it has two foreignkeys pointing to "TextData"). Any clue? This
ist a 1:1-Relation from Zertifikat to TextData. There is currently no
foreign key constraint for the foreign keys in the database because I'm
updating my data structure (Is this a problem?).

I also think, that the calls to "makePersistent" and "tx.flush" shouldn't be necessary at all?

Thanks a lot!

-Gunnar

query.create("select all from " + Zertifikat.class.getName());
DList res =(DList)query.execute();
System.out.println("found "+res.size()+" "+Zertifikat.class.getName());
                        
Iterator iter=res.iterator();
        while(iter.hasNext()) {
                InterfaceZertifikat zert=(InterfaceZertifikat)iter.next();
                tx.lock(zert, Transaction.WRITE);
                TextData plain=new TextData(zert.getData(), "Zertifikat "+zert.getKey() + " 
Beschreibung");
                TextData xml=new TextData(zert.getData(), "Zertifikat "+zert.getKey() + " 
XML");
                db.makePersistent(plain);
                db.makePersistent(xml);
                zert.setPlainData(plain);
                zert.setXmlData(xml);
                tx.flush();
                System.out.println("updated Zertifikat "+zert.getKey());
}
System.out.println("\ndone");
tx.commit();



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to