Michał Maliszewski (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ad7619...
) *commented* on HHH-16859 (
https://hibernate.atlassian.net/browse/HHH-16859?atlOrigin=eyJpIjoiNDU1Yz...
)
Re: max() doesn't work with Enums (
https://hibernate.atlassian.net/browse/HHH-16859?atlOrigin=eyJpIjoiNDU1Yz...
)
Unfortunately, “I don’t see how it makes sense …” is not a valid argument in this
discussion. I would like to provide some valid argumentation to consider in this topic:
* In any relational database there is an option to do:
SELECT max ( int ) FROM X
* Hibernate is the framework which has one job, this job is the O/R Mapping. That’s what
the entity code I posted does:
@Column(name = "SOME_ENUM" )
@Enumerated(EnumType.ORDINAL)
private ESomeEnum type;
* The above proves the framework does not do what it is designed for. I would expect if
the defined mapping is supported, everything that uses the O/R Mapping also should be
supported. In this particular case if my int column is mapped to Enum, I should be able to
work with the Enums in the code and those should also be properly mapped.
* Moreover, the functionalities around the Enums are inconsistent as, the above example is
not possible, while the code below is:
@Query( "select s from SomeDbo s where enum = int " )
List<SomeDbo> findSomeOfTypeOne();
* This is also a regression to the previous versions where that functionality was
supported.
* Last, but not least, if the Hibernate Team decided to not support it anymore, this
should be documented and properly described in the Migration Guide, which currently is not
the case.
(
https://hibernate.atlassian.net/browse/HHH-16859#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16859#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100227- sha1:534ec1c )