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

Failures when defining callbacks for abstract entities

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

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.0
    • Undefined future, 3.0.3
    • None
    • None

    Description

      http://markmail.org/message/urk6a4c2owilyxmw

      If a class for an abstract entity is defined as "abstract" (for now manually, see CAY-1411), and a callback method is not defined (it will be generated as abstract in _Entity class), Cayenne would throw something like this:

      Exception in thread "main" java.lang.IllegalArgumentException: Class mrg.model.Product has no valid callback method 'xxxxx'

      inside CallbackOnEntity. CallbackOnEntity should take into account abstract method definition in a superclass to prevent this from happenning.

      For now a simple workaround is to define a noop non-abstract method in the abstract subclass.

      Attachments

        Activity

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

          People

            Unassigned Unassigned
            andrus Andrus Adamchik

            Dates

              Created:
              Updated:

              Slack

                Issue deployment