Have u added the certificate to the customer? Could not see that from code posted.
Shane > -----Original Message----- > From: Gunnar Hilling [mailto:[EMAIL PROTECTED] > Sent: Friday, 10 October 2003 1:28 p.m. > To: [EMAIL PROTECTED] > Subject: Re: odmg/caching problem? > > Additional Detail: > > Bothe the customer and the certificate are available when being created, > only the relation (Collection) of the newly created customer is not > updated when querying ... > > > Hello, > > > > I got the following small program (snippet): > > > > Customer customer=new Customer("no", "one", "here", "0", "", 2, > null); > > tx = odmg.newTransaction(); > > tx.begin(); > > db.makePersistent(new Certificate("Z1\n", customer)); > > db.makePersistent(customer); > > tx.commit(); > > > > DList allProducts = (DList) query.execute(); > > Iterator iter = allProducts.iterator(); > > while (iter.hasNext()) > > { > > customer=(Customer)iter.next(); > > System.out.println(customer.getBenutzername() + ": " + > > customer.getCertificates().size()); > > } > > > > I think the Details don't matter: One Customer can have many > Certificates > > (1:n relationsship, navigatable in both directions here). > > > > Now the Problem: > > > > The Certificate created for the Customer is NOT listed in the first run > of > > the program, output: > > > > 1065740029439: 0 > > done! > > > > When running the program for a second time, the records created in the > > first run are read correctly, output this time: > > > > 1065740029439: 1 > > 1065740078144: 0 > > done! > > > > ... and so on. > > Anyone any clues? > > > > Thanks a lot, > > > > -Gunnar > > > > --------------------------------------------------------------------- > 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]