Re: toMany relationship returning null

From: Gili (cowwo..bs.darktech.org)
Date: Thu Sep 08 2005 - 02:37:19 EDT

  • Next message: Gili: "Deleted objects, queries and DataContext"

            That is possible. As far as I can tell, referencing
    Collections.EMPTY_LIST consumes as much resources as pointing to null.
    Is there any reason we don't initialize delegates' lists to
    Collections.EMPTY_LIST? I could contribute a patch if necessary, but
    does this sound reasonable to everyone?

    Gili

    Eric Schneider wrote:
    > Gili,
    >
    > Sounds like the object was never registered, or somehow it's
    > persistence state is transient. Normally, toMany relationships will
    > always return an empty List if there are no related objects.
    >
    > Eric
    >
    > On Sep 7, 2005, at 4:02 PM, Gili wrote:
    >
    >> Hi,
    >>
    >> I'm expecting a toMany relationship to return an empty list if
    >> empty and it seems to return null. Is this by design (I can't seem to
    >> find it documented anywhere). Does this mean I have to check for both
    >> null or an empty list everywhere in my code or is there an easier way?
    >>
    >> Thanks,
    >> Gili
    >> --
    >> http://www.desktopbeautifier.com/
    >>
    >
    >

    -- 
    http://www.desktopbeautifier.com/
    



    This archive was generated by hypermail 2.0.0 : Thu Sep 08 2005 - 02:37:18 EDT