[jira] Created: (CAY-1081) DataObjectUtils.objectForPk broken in ROP

From: Andrus Adamchik (JIRA) ("Andrus)
Date: Wed Jun 25 2008 - 09:05:52 EDT

  • Next message: Andrus Adamchik (JIRA): "[jira] Closed: (CAY-1081) DataObjectUtils.objectForPk broken in ROP"

    DataObjectUtils.objectForPk broken in ROP
    -----------------------------------------

                     Key: CAY-1081
                     URL: https://issues.apache.org/cayenne/browse/CAY-1081
                 Project: Cayenne
              Issue Type: Bug
              Components: Cayenne Core Library
        Affects Versions: 3.0
                Reporter: Andrus Adamchik
                Assignee: Andrus Adamchik
                Priority: Minor
                 Fix For: 3.0

    This affects 3.0 (as DataObjectUtils simply didn't work before 3.0). Generated ObjectId contains the name of ObjAttribute instead of DbAttribute resulting in exception like this:

     ClientMtTable1 o = DataObjectUtils.objectForPK(context, ClientMtTable1.class, 1);

    Jun 25, 2008 3:56:57 PM org.apache.cayenne.access.QueryLogger logQueryError
    INFO: *** error.
    org.apache.cayenne.exp.ExpressionException: [v.${project.version} ${project.build.date} ${project.build.time}] Can't resolve path component: [MT_TABLE1.table1Id].
            at org.apache.cayenne.map.PathComponentIterator.invalidPathException(PathComponentIterator.java:146)
            at org.apache.cayenne.map.PathComponentIterator.next(PathComponentIterator.java:134)
            at org.apache.cayenne.map.PathComponentIterator.next(PathComponentIterator.java:1)
            at org.apache.cayenne.access.trans.QueryAssemblerHelper.appendDbPath(QueryAssemblerHelper.java:172)
            at org.apache.cayenne.access.trans.QualifierTranslator.objectNode(QualifierTranslator.java:348)
            at org.apache.cayenne.exp.Expression.traverse(Expression.java:464)
            at org.apache.cayenne.exp.Expression.traverse(Expression.java:461)
            at org.apache.cayenne.exp.Expression.traverse(Expression.java:441)

    -- 
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
    



    This archive was generated by hypermail 2.0.0 : Wed Jun 25 2008 - 09:06:21 EDT