Re: CayenneRuntimeException: Can't find id

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Jan 15 2008 - 05:38:20 EST

  • Next message: Daniel Kvasnička jr.: "Re: CayenneRuntimeException: Can't find id"

    Hi Dan,

    Not even sure at this point that this is an issue of int vs. long... I
    wonder how the *new* object even appears in the paginated list that
    was created *before* the new object? Or did I misunderstand something
    about your scenario?

    Maybe it would help if you could post the exception and the SQL log
    preceding it.

    Thanks
    Andrus

    On Jan 14, 2008, at 10:07 PM, Daniel KvasniÄŤka jr. wrote:

    > Hi people,
    > I've bumped into an error with cayenne 2.0.4 and the only similar
    > things I found were this message
    > (http://cayenne.markmail.org/message/elln5rjlgrsdinxm?q=paging+cache+type:users
    > )
    > and the bug CAY-643 (and those linked to it).
    >
    > What I do is that I load a page with paginated query (list of
    > articles, first 10), then I hit "new article" on the page, create and
    > save the article and return back to the list.
    > Then I paginate to find the newly added article and when I enter the
    > page it is on and the page is the last page at the same time, I get
    > the CayenneRuntimeException with "Can't find id for [the newly added
    > article]" (i.e. when I set sorting to, let's say, by ID DESC -- which
    > puts the new article to the first page -- everythong is OK on all
    > pages)
    >
    > I understand there is the problem with long vs. int and that it will
    > be fixed in 3.0, so how can I as a user prevent this error in 2.0.4?
    > This seems to me like a very common scenario in listing records and
    > doing CRUD operations, but it seems almost nobody encounters this. Do
    > you guys adandon pagination and use raw sql?
    >
    > I wanted to try 3.0M2, but when using it Stripes couldn't find any
    > ActionBeans url mappings -- strange.
    >
    > Thanks for all hints in advance,
    > Dan
    >
    > --
    > http://www.danielkvasnicka.net -- webdesign & corporate design,
    > programování internetových a intranetových aplikací
    >



    This archive was generated by hypermail 2.0.0 : Tue Jan 15 2008 - 05:38:59 EST