As annotation processor and query types (EnumPath) are general, it hardly seems appropriate to put there some Hibernate-bug-specific hacks. Could this be worked around like...
1) Collect all property related annotations (including @Enumerated) to Path. As these cannot be annotations of the path field itself, the path should provide a method for getting annotations of the original member. In addition to this bug-workaround, these annotations could be used e.g. for validation of (batch) update parameters using validation annotations of the original member. This could be useful for some applications also.
2) In Hibernate specific JPQLSerializer extension visitOperation could check if a) first parameter is an enum constant and b) second argument (e.g. SetPath) has optional @Enumerated annotation. Then it could change the enum constant to ordinal integer or name string before calling super.visitOperation.
As annotation processor and query types (EnumPath) are general, it hardly seems appropriate to put there some Hibernate- bug-specific hacks. Could this be worked around like...
1) Collect all property related annotations (including @Enumerated) to Path. As these cannot be annotations of the path field itself, the path should provide a method for getting annotations of the original member. In addition to this bug-workaround, these annotations could be used e.g. for validation of (batch) update parameters using validation annotations of the original member. This could be useful for some applications also.
2) In Hibernate specific JPQLSerializer extension visitOperation could check if a) first parameter is an enum constant and b) second argument (e.g. SetPath) has optional @Enumerated annotation. Then it could change the enum constant to ordinal integer or name string before calling super.visitOper ation.
?