Unable to locate MappedSuperclass version attribute when mixing annotations with hibernate mapping files
Description
mapping file
Person.Class
AbstractAggregateRoot.Class
PersonLookupDTO.class
when create jpa query, do projection with dto and try to get the verison field, root.get("version"), an exception throwed. i debug into the source code of hibernate, i found final Property declaredVersion = persistentClass.getDeclaredVersion(); getDeclaredVersion is null, but getVersion has value.
mapping file
Person.Class
AbstractAggregateRoot.Class
PersonLookupDTO.class
when create jpa query, do projection with dto and try to get the verison field, root.get("version"), an exception throwed. i debug into the source code of hibernate, i found final Property declaredVersion = persistentClass.getDeclaredVersion(); getDeclaredVersion is null, but getVersion has value.
exception details: