Re: Using "relationship != null" qualifier with ObjEntity Inheritance

From: Dave Dombrosky (dombr..mail.com)
Date: Wed Aug 06 2008 - 14:29:00 EDT

  • Next message: Andrus Adamchik: "Re: Using "relationship != null" qualifier with ObjEntity Inheritance"

    Yes it is just a 1:1 mapping on the relationship.

    Here is the stack trace:

    org.apache.cayenne.exp.ExpressionException: [v.3.0-SNAPSHOT Aug 01
    2008 19:55:10] Error evaluating expression 'db:some_relationship !=
    null'
            at org.apache.cayenne.exp.parser.SimpleNode.evaluate(SimpleNode.java:331)
            at org.apache.cayenne.exp.Expression.match(Expression.java:367)
            at org.apache.cayenne.map.EntityInheritanceTree.entityMatchingRow(EntityInheritanceTree.java:97)
            at org.apache.cayenne.map.EntityInheritanceTree.entityMatchingRow(EntityInheritanceTree.java:83)
            at org.apache.cayenne.access.ObjectResolver.objectFromDataRow(ObjectResolver.java:194)
            at org.apache.cayenne.access.ObjectResolver.objectsFromDataRows(ObjectResolver.java:121)
            at org.apache.cayenne.access.ObjectResolver.synchronizedObjectsFromDataRows(ObjectResolver.java:101)
            at org.apache.cayenne.access.DataDomainQueryAction$ObjectConversionStrategy.toObjects(DataDomainQueryAction.java:591)
            at org.apache.cayenne.access.DataDomainQueryAction$SingleObjectConversionStrategy.convert(DataDomainQueryAction.java:661)
            at org.apache.cayenne.access.DataDomainQueryAction.interceptObjectConversion(DataDomainQueryAction.java:466)
            at org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:128)
            at org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:740)
            at org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:317)
            at org.apache.cayenne.util.ObjectContextQueryAction.execute(ObjectContextQueryAction.java:96)
            at org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1336)
            at org.apache.cayenne.access.DataContext.performQuery(DataContext.java:1325)
            at org.apache.cayenne.access.ToOneFault.doResolveFault(ToOneFault.java:82)
            at org.apache.cayenne.access.ToOneFault.resolveFault(ToOneFault.java:55)
            at org.apache.cayenne.CayenneDataObject.readProperty(CayenneDataObject.java:208)
            at org.apache.cayenne.CayenneDataObject.setToOneTarget(CayenneDataObject.java:295)

    -Dave

    On Wed, Aug 6, 2008 at 11:59 AM, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > Could you post a bigger part of the stack trace (at least everything that
    > has org.apache.cayenne in it)?
    >
    > From what I can see, this is related to in-memory evaluation of the
    > qualifier. If that's a to-one relationship based on FK, intuitively this
    > should work, but it probably hits a limitation on in-memory evaluation.
    >
    > Andrus
    >
    >
    > On Aug 5, 2008, at 5:23 PM, Dave Dombrosky wrote:
    >
    >> I am currently trying to use ObjEntity Inheritance in my project, but
    >> I am running into some difficulties. I was hoping that I could use
    >> "someRelationship != null" as the qualifier, but I get the following
    >> error when trying to run the code:
    >>
    >> org.apache.cayenne.exp.ExpressionException: [v.3.0-SNAPSHOT Aug 01
    >> 2008 19:55:10] Error evaluating expression 'db:some_relationship !=
    >> null'
    >>
    >> Am I doing something wrong here, or did I find a bug?
    >>
    >> -Dave
    >>
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Aug 06 2008 - 14:29:31 EDT