Re: Object Caching in 1.2

From: Andrey Razumovsky (razumovsky.andre..mail.com)
Date: Wed Nov 26 2008 - 02:45:07 EST

  • Next message: Laurent Marchal: "Re: Using Cayenne with RCP and Birt?"

    Hmm.. it should work. Can you give a snippet of your code?
    I haven't ever worked with Cayenne 1.2, but I know for sure it works in
    Cayenne 3.0. (e.g. 3.0M4).

    2008/11/25, Dave Merrin <dmerri..pasystems.co.uk>:
    >
    > Hi Andrey,
    >
    > I tried that but it didn't seem to make any difference. Will try again when
    > I get a free mo. From the documentation it certainly seems to cover my
    > requirements.
    >
    > Cheers,
    >
    > Dave
    >
    > Andrey Razumovsky wrote:
    >
    >> Hi Dave,
    >>
    >> you can use prefetching:
    >> http://cayenne.apache.org/doc12/prefetching.html
    >>
    >> In short words, you need to specify selectQuery.addPrefetch("toEdition")
    >> for
    >> the query you fetch newsparers with.
    >>
    >> 2008/11/18, Dave Merrin <dmerri..pasystems.co.uk>:
    >>
    >>
    >>> Hi,
    >>>
    >>> I'm trying to speed up some code I've got. I've got two connected tables,
    >>> Newspaper and Edition. Newspapers contain several editions. Initially I
    >>> get
    >>> back a list of newspapers with a single query. Then I want to get the
    >>> editions for each newspaper. I use newspaper.getToEdition() to do this.
    >>> Unfortunately this results in one query per newspaper.
    >>>
    >>> To try and speed things up I thought I could get a list of all editions
    >>> back with a single query. I assumed cayenne would store them in the
    >>> object
    >>> cache and save the query per newspaper problem above. Unfortunately it
    >>> doesn't.
    >>>
    >>> I'm using Cayenne 1.2. Am I doing something wrong or am I just expecting
    >>> too much from Cayenne.
    >>>
    >>> Cheers,
    >>>
    >>> Dave
    >>>
    >>>
    >>>
    >>
    >>
    >>
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Nov 26 2008 - 02:45:54 EST