I am not really qualified to explain ... others may take up that task ...
hello others??

I have actually decided (at this stage) to use the PersistenceBroker API
instead of the ODMG implementation.  It just seems to do what I want with
far less code.  Especially with 1:n:n relationships.

That said.... I think the way to view the ODMG API is that 1. You need to
manage your objects and 2. You need to manage your persistence.  And the two
are not the same thing.

For example ---

I create a Parent object, add some Children and then persist.  It works.
But if I retrieve the Parent object and add some Children and persist the
Parent ... the db is not updated with the new Children.... I need to persist
the Children as well.  My expectation would have been that it was taken care
of for me via my mappings.

By using the auto-insert/update settings and the PersistenceBroker I get
what I expect.

Anyway as I have mentioned my experience is not vast so I would defer to
expert advice/opinion :-)


Shane


> -----Original Message-----
> From: Gunnar Hilling [mailto:[EMAIL PROTECTED]
> Sent: Friday, 10 October 2003 1:47 p.m.
> To: [EMAIL PROTECTED]
> Subject: RE: odmg/caching problem?
> 
> On Fri, 10 Oct 2003 13:29:10 +1300, Shane Mingins wrote:
> 
> > Have u added the certificate to the customer?  Could not see that from
> code
> > posted.
> >
> No, I want to model a 1:n relation that is navigatable in both directions.
> so the foreign key is inserted in the Constructor of Certificate:
> 
> new Certificate(..., "customer");
> 
> This works fine for the creation of the foreign key field in the reference
> of Certificate
> 
> But You're right, changing the code to
> 
> customer.addCertificate(new Certificate(..., "customer"));
> 
> works...
> 
> I dropped this approach because I thought the Certificate Object would be
> added twice this way ... (It is, somehow, because the foreign key already
> exists).
> OK, now I hope I know ho to do this. I assume the behaviour is related to
> Caching? Because in some other Thread I think Thomas Mahler said, every
> Query would be executed on the Database. So I thought the results should
> be the same, no matter if written some Minutes before or immediately after
> tx.commit().
> 
> Perhaps You could help me understand this behaviour?
> 
> 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]

Reply via email to