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

No possible to select non Entity object via Native query

    XMLWordPrintableJSON

Details

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

    Description

      After DELTASPIKE-978 in repository no possible to select non Entity object via Native query.
      For example(very simple):

      @Query(
      isNative = true,
      value = "  SELECT  name  FROM actions ")
      @Override
      public abstract Collection<String> listActions();
      

      Reason:
      Changes in AnnotatedQueryBuilder.java

      • result = params.applyTo(entityManager.createNativeQuery(jpqlQuery));
        + result = params.applyTo(entityManager.createNativeQuery(jpqlQuery, context.getEntityClass()));

      Now native query can return only Entity of this repository.

      Attachments

        Activity

          People

            johndament John D. Ament
            pioneer.vvs@gmail.com VITALIY SAVCHENKO
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: