Closed jclausen closed 5 years ago
ACtually, id
is hibernate's alias to the REAL identifier. So we do not need to do this. Hibernate figures it out by leveraging the keyword id
:
https://docs.jboss.org/hibernate/orm/3.3/reference/en-US/html/queryhql.html
The special property (lowercase) id may be used to reference the identifier property of an entity provided that the entity does not define a non-identifier property named id.
Nice! I’ll refactor this back on those properties then. I’d like to keep the change to exists(), though because, otherwise, it blows up when the entity is a reserved word.
The test errors failing this build have nothing to do with the code modified. They have to do with Adobe compat on the new dirty/clean entity methods
Closing this, as I think we tackled it.
Converts the usage of
id
as a hard-coded identifier inBaseORMService
to use dynamic key name.Downside: Dynamically pulling the key name requires a load of the object graph via entityNew()