Uploaded image for project: 'Hibernate ORM'
  1. HHH-11452

No scalar functions can be used in the Envers Query API

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: None
    • Fix versions: 6.0.0.Beta1
    • Components: hibernate-envers
    • Labels:
      None
    • Last commented by a user?:
      true
    • Sprint:

      Description

      While HQL supports scalar functions (see user guide 15.27) the envers query API does not support them.

      I suggest to change the signature of the method AuditProperty.function(String) to return an AuditProperty instead of an AuditProjection. Since AuditProperty implements AuditProjection this would not break existing code. However this change will break binary compatibility, is this a problem?

      Code example:

      AuditReader reader = ...;
      reader.createQuery()
        .forEntitiesAtRevision(EntityA.class, 3)
        .add(AuditEntity.property("number")
        .function("STR").eqProperty("string"))
      

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: