Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-1158

It is not possible to override generic methods defined within delegates

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.1
    • 1.7.0
    • Data-Module
    • None

    Description

      While looking at DELTASPIKE-1157, I found that its not actually possible to define a custom findBy method directly in a repository. It probably works if you have a generic layer between your repositories and DeltaSpike, e.g.

      public abstract class CustomRepo<E,PK> extends AbstractEntityRepository<E, PK>
      

      The delegate method doesn't work properly due to bad match on the return types. Attached is a test case that proves it (ignore the query hints part)

      Attachments

        Activity

          People

            johndament John D. Ament
            johndament John D. Ament
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: