Re: Weird Behaviour with Nullify rule

From: Andrus Adamchik (
Date: Thu Oct 21 2004 - 20:34:41 EDT

  • Next message: Andrus Adamchik: "Re: Prefetching with inheritance oddity"

    Hi Jorge,

    On Oct 21, 2004, at 11:15 AM, Jorge Sopena wrote:
    > I receive the PK for this path and search the object:
    > Path  path = 
    > (Path)DataObjectUtils.objectForPK(dataContext,Path.class,new
    > Long(pk));
    > //I see the query in the log

    That line already looks weird... As your Path object is in memory,
    there shouldn't be a query, and a cached object should be used. So at
    this point things have already gone wrong... :-/

    It is very likely that ObjectId for Path created via Cayenne uses
    "Integer" for id, not "Long"... I may need to check that. We already
    have a bug report showing how different data types in joins can lead to
    (, this
    could be something similar. So if you replace "new Long(pk)" with "new
    Integer(pk)", does it change anything?

    BTW, I am still undecided on the best way to fix CAY-191 and generally
    make ObjectId type-agnostic without sacrificing too much performance...


    This archive was generated by hypermail 2.0.0 : Thu Oct 21 2004 - 20:34:48 EDT