Re: Borrow your eyes for a minute?

From: Jonathan Carlson (Jonathan.Carlso..atun.com)
Date: Tue Dec 20 2005 - 15:35:49 EST

  • Next message: Marek Wawrzyczny: "Re: 3t server enchancements"

    Thanks. The query logging is turned on and it shows the exact same
    query as when it looks for all rows in the table. IOW, there is no
    WHERE clause on the query. :-(

    Also, the result is the same whether or not the FATHER_ID is null.

    I'll keep tinkering with it. I'm bound to run into it sooner or
    later.

    Thanks. If you have any more thoughts or idea, please let me know.

    >>> mkienen..mail.com 2005-12-20 1:31:06 PM >>>
    What does the query log output show?

    On 12/20/05, Jonathan Carlson <Jonathan.Carlso..atun.com> wrote:
    > I've put off asking this for a week or so now because I'm sure this
    has
    > to be something I messed up (it was working fine), but I'm giving up
    and
    > asking if somebody might be able to see what I can't.
    >
    > I have a very basic PERSON table with a to-one FATHER_ID
    relationship
    > that loops back on the PERSON table. When I do a getFather() on any
    > Person instance, I get this error:
    >
    > org.objectstyle.cayenne.CayenneRuntimeException: [v.1.1.2 April 28
    > 2005] More than 1 object found for ObjectId
    > wicket.contrib.rad.example.cayenne.data.Person (temp): . Fetch
    matched
    > 16 objects.
    >
    > I have exactly 16 rows in that table, so it looks like Cayenne is
    just
    > not using the ID as a qualifier.
    >
    > Here are the appropriate parts in my Map.xml:
    >
    > <db-entity name="PERSON">
    > <db-attribute name="FATHER_ID" type="INTEGER"/>
    > <db-attribute name="FIRST_NAME" type="VARCHAR" length="50"/>
    > <db-attribute name="ID" type="INTEGER" isPrimaryKey="true"
    > isMandatory="true"/>
    > <db-attribute name="LAST_NAME" type="VARCHAR" length="50"/>
    > <db-attribute name="MOTHER_ID" type="INTEGER"/>
    > <db-attribute name="SEX" type="CHAR" length="1"/>
    > </db-entity>
    >
    > <db-relationship name="FATHER_CHILD_REL" source="PERSON"
    > target="PERSON" toMany="true">
    > <db-attribute-pair source="ID" target="FATHER_ID"/>
    > </db-relationship>
    > <db-relationship name="FATHER_REL" source="PERSON" target="PERSON"
    > toMany="false">
    > <db-attribute-pair source="FATHER_ID" target="ID"/>
    > </db-relationship>
    >
    > <obj-relationship name="father" source="Person" target="Person"
    > db-relationship-path="FATHER_REL"/>
    > <obj-relationship name="fatherOf" source="Person" target="Person"
    > db-relationship-path="FATHER_CHILD_REL"/>
    >
    > Any ideas of what I can do to further debug this issue? I'm rather
    > stuck until I get this resolved.
    >
    > Thanks!
    >
    > Jonathan
    >
    >
    ______________________________________________________________________
    > This email and any files transmitted with it are confidential and
    > intended solely for the use of the individual or entity to whom they
    > are addressed. If you have received this email in error please
    notify
    > the system manager.
    >
    > Katun Corporation -- www.katun.com
    >
    _____________________________________________________________________
    >

    ______________________________________________________________________
    This email has been scanned by the MessageLabs Email Security System.
    For more information please visit http://www.messagelabs.com/email
    ______________________________________________________________________

    ______________________________________________________________________
    This email and any files transmitted with it are confidential and
    intended solely for the use of the individual or entity to whom they
    are addressed. If you have received this email in error please notify
    the system manager.

    Katun Corporation -- www.katun.com
    _____________________________________________________________________



    This archive was generated by hypermail 2.0.0 : Tue Dec 20 2005 - 15:36:29 EST