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

Default POST_LOAD callbacks break aggregate queries

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.0M3
    • Core Library
    • None

    Description

      Whenever there is a catch all default POST_LOAD callback, EJBQL aggregate queries (that return Object[]) would throw:

      ava.lang.ClassCastException: [Ljava.lang.Object;
      at org.apache.cayenne.reflect.LifecycleCallbackEventHandler.performCallbacks(LifecycleCallbackEventHandler.java:145)
      at org.apache.cayenne.reflect.LifecycleCallbackRegistry.performCallbacks(LifecycleCallbackRegistry.java:144)
      at org.apache.cayenne.access.DataDomainQueryAction.invokePostLoad(DataDomainQueryAction.java:153)
      at org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:132)
      at org.apache.cayenne.access.UnitTestDomainQueryAction.execute(UnitTestDomainQueryAction.java:48)
      at org.apache.cayenne.access.UnitTestDomain.onQuery(UnitTestDomain.java:62)
      at org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:282)
      at org.apache.cayenne.access.DataContextQueryAction.execute(DataContextQueryAction.java:59)
      at org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1323)
      at org.apache.cayenne.access.DataContext.performQuery(DataContext.java:1312)
      at org.apache.cayenne.access.DataContextEJBQLQueryTest.testSelectAggregate(DataContextEJBQLQueryTest.java:51)

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment