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

[Deltaspike Data] Regoznize Entity Type by method returned type if @Repository.forEntity is set to default

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.7.0
    • None
    • Data-Module
    • None

    Description

      I want to use Deltaspike Data Repo as a Service because it is simplistic and not DAO.
      Since of service operates over multiple entities I want the extension to recognize the Entity type dynamically by method return type.
      Notice the example does not implement EntityRepository and therefore the only return type should be checked.

      @Repository
      public interface Java8Repository {
        MyEntity findByCourse(@NotNull String courseName);
        AnotherEntity findByCustomer(@NotNull String customerName);
      
        @Query("........")
        Object[] findMultipleEntityTypes(@NotNull String attribute);
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            tibordigana Tibor Digana
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: