Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: None
    • Fix versions: 6-wishlist
    • Components: None
    • Labels:
    • Last commented by a user?:
      true
    • Sprint:

      Description

      Despite how crazy this idea sounds, there is an existing project that was the inspiration behind this: Linq Method Query Syntax

      The idea would be simple on the API level, define the set of methods i.e.:

      • where
      • join
      • select
      • groupBy
      • orderBy

      That would take a Predicate as parameter (or other suitable functional interface) allowing to construct queries in a form:

      session.createQuery(Event.class).where(e -> e.getType().equals("Java 8")).orderBy(e -> e.createDate())
      

      While this clearly introduces completly new syntax for creating queries next to existing HQL, criteria API and QBE it might be wort considering it.

      The implementation definetly won't be trivial, but probably can be based on already widely used ASM that would have to be used to do the reverse enginering of the lambda statements.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                3 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated: