Re: trouble with to-one relation

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Oct 29 2003 - 11:01:31 EST

  • Next message: Axel HONFI: "Strange behaviour with creating an object"

    Hi Tore,

    This is strange. Relationships like that never caused any trouble...
    Could you send some sample code and the mapping. You can send it to me
    directly.

    Andrus

    On Oct 29, 2003, at 3:53 AM, Tore Halset wrote:

    > Hello!
    >
    > I am using cayenne-1.0.2, but had the same problem with 1.0.0. MS Sql
    > Server as database. The relation are like this:
    >
    > A<-->>B<-->>C
    >
    > The PKs for A, B and C are integers managed by cayenne.
    >
    > Following the relation from A to B to C are working, but the reverse
    > are
    > not working.
    >
    > currentC.getB() lead to a correct sql-query, but the returned B-object
    > are
    > not filled with values from the database. All the fields of the new
    > B-object has (incorrect) null-values. currentB.getB().getName()
    > returns
    > null, but it should not be null.
    >
    > I think the relations are defined correctly in the Modeler. "Validate
    > Project" does not complain.
    >
    > Regards,
    > - Tore.
    >



    This archive was generated by hypermail 2.0.0 : Wed Oct 29 2003 - 11:01:35 EST