Reputation: 93
What's the easiest way to uniquely identify an Hibernate SQLQuery (https://docs.jboss.org/hibernate/orm/3.5/api/org/hibernate/SQLQuery.html) once it has been created and all it's parameters bound?
I've found this to generate a query key: http://docs.jboss.org/hibernate/orm/4.2/javadocs/org/hibernate/cache/spi/QueryKey.html. But, that does not appear to be usable outside of hibernate internals.
Upvotes: 1
Views: 140
Reputation: 154090
You can use a @NamedNativeQuery to uniquely identify an SQLQuery.
Upvotes: 1