> -----Ursprüngliche Nachricht-----
> Von: Andrus Adamchik [mailto:andru..bjectstyle.org]
> Gesendet: Freitag, 10. Februar 2006 00:03
> An: cayenne-use..bjectstyle.org
> Betreff: Re: Problems with caching
>
> On Feb 9, 2006, at 4:39 PM, Marcin Skladaniec wrote:
> > Caching as for now works only with queries with name, and that is
> > all NamedQueries and SelectQuery initialized with
> > queryWithParameters(Map params, boolean pruneMissing) (did I miss
> > something ?). I think that exception telling that is consumed
> > somewhere and never displayed.
>
> Marcin, I don't think Ayhan's items (2) and (3) are related to the
> query name.
>
That's right Marcin. Items (2) and (3) aren't related to (1).
>
> On Feb 9, 2006, at 10:53 AM, Ayhan Kondoz wrote:
>
> > (2) Caching of objects that have a relationship to the customer.
> > Meaning
> > that if the first SOAP call accesses the accounts of a customer
> > subsequent SOAP calls should NOT read them from the database
> > again.
> > The
> > accounts should be cached along with the customer and calls to
> > Customer().getAccount() should read the accounts from cache.
>
>
> To-many relationships can only be cached within the same DataContext.
> Across DataContexts only individual objects can be cached (and most
> to-one relationships). It looks like your [customer -> account] is
> one-to-many? 1.2 would allow such caching to occur with nested
> DataContexts soon (but not yet).
>
Yes they are one-to-many relationships.
> For now you may implement a custom workaround with a cover "getAccount
> ()" method that inflates accounts array (if it is not inflated yet)
> from a custom cache via DataContext.objectsFromSnapshots(..)
>
Could you explain DataContext.objectsFromSnapshots(..)? I could not find it in the API.
> > JavaGroups seems to work fine, at least the McastReceiverTest and
> > McastSenderTest from the JavaGroups documentation works.
> > Nevertheless the snapshot events do not reach the other servers.
>
> Don't know. Can you see any outgoing multicast traffic from your app?
> Or can you run your app in debugger (e.g. in Eclipse) and put a
> breakpoint in org.objectstyle.cayenne.event.JavaGroupsBridge
>
I think this could be related to item (2). What I did was to put the whole customer object into a cache and I only changed/worked on the relationships. Becourse the customer object was in a cache the account objects where not loaded from the database again. if the caching for relationships is still not working I guess that the snapshot events for changes in relationships objects is still not working aswell?
Thans
Ayhan
> Andrus
>
>
>
>
This archive was generated by hypermail 2.0.0 : Fri Feb 10 2006 - 11:25:24 EST