Re: CayenneRuntimeException: Can't find id

From: Daniel Kvasnička jr. (daniel.kvasnicka.j..mail.com)
Date: Sat Jan 19 2008 - 15:11:51 EST

  • Next message: Andrus Adamchik: "Re: CayenneRuntimeException: Can't find id"

    > Firstly, this is really quite fast. We use this approach on a Swing
    > application (three tier) with our largest customer now with 120,000
    > contacts in one table. Pulling this across the network takes only a
    > few seconds. Remember that Cayenne is just fetching the primary key
    > from the database for all but the page of data you want to fault.

    Well, from that SQL log and from what Andrus have said it doesn't seem
    so. You're probably using 3.0?

    Also, I've tried setting a name for the query and tried all of the
    cache policies listed here
    http://cayenne.apache.org/doc20/caching-query-results.html and cayenne
    still fetches everything on every page load -- with whatever cache
    policy I choose.
    When I remove setPageSize, caching works, so it's paradoxically better
    than with paging. With paging, on every page cayenne retrieves full
    table + records relevant for the page. Without paging, caching works,
    so full table is read, but only once and on every page there is "SQL
    silence" from now on (it is evident that this is unusable -- storing
    whole table in the cache)

    So how can I make cayenne 2.x read IDs (or full table and retain only
    IDs) on first paginated query run and then query only for relevant
    records? Am I doing something wrong when setting cache policy?

    -- 
    http://www.danielkvasnicka.net -- webdesign & corporate design,
    programování internetových a intranetových aplikací
    



    This archive was generated by hypermail 2.0.0 : Sat Jan 19 2008 - 15:12:29 EST