Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1081

DataObjectUtils.objectForPk broken in ROP

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0
    • 3.0M5
    • Core Library
    • None

    Description

      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)

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: