Re: missing toOne

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu May 27 2004 - 10:14:58 EDT

  • Next message: Mike Kienenberger: "Re: missing toOne"

    On May 27, 2004, at 4:56 AM, Tore Halset wrote:

    > Hello!
    >
    > My model has a to-one relation A->B that sometimes are empty. Is that
    > supported? How can I test if a B exist for a given A? Checking for
    > (a.getB() == null) does not work. It seems like a.getB returns a empty
    > object with every attribute set to null.
    >
    > Regards,
    > - Tore.

    Tore,

    I remember this used to be a bug in the past, but this should've been
    fixed long time ago. "a.getB() == null" should work. So the question is
    - what version of Cayenne are you using? And also how is the
    relationship mapped?

    Andrus



    This archive was generated by hypermail 2.0.0 : Thu May 27 2004 - 10:15:03 EDT