Hi Rainer.

I built the recursive walker outside of castor.  I did use the
ClassDescriptor/FieldDescriptor to walk the graph.

I'm not sure of the performance implications yet.  I believe that in many
cases the database would only be updated if the object has been modified or
the dirty checking that castor does determines that an update is necessary.

-- Don


-----Original Message-----
From: Rainer Mueller [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 9:44 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Any luck with many-to-many queries?


Hello Don!

> For 1)
> I solved the problem with storing many-to-many relationship by making sure
> all objects in the relationship were visible to the current db
transaction.
> I use long transactions and hence this was causing a problem with them
> persisting.  The solution was to make a recursive walker that walked
across
> the parent object. When it came to non-dependent collections I would make
> sure to call db.update on those object(s) directly.  After this I would
then
> call db.commit() and the relationships would be saved.

Update the database its data every time when you are calling db.update? I
think it
would be getting very slow - am I right?

I have the same problem with long transactions. Is your code in the CVS or
is just a
patch for your application?

Kind regards
  Rainer

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

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

Reply via email to