I understand that the Hibernate reference states that "Version properties, identifiers, and associations are ignored". And I understand how to add associations. But I'd like to be able to use Example criteria even when the identifier is given.
Here's my situation. I'm currently using Example criteria for "search" queries. The user specifies search criteria, and the appropriate object graph is created to enable the creation of an Example criteria. But, the user has the ability to specify an identifier field as one of the search criteria.
Since the identifier is ignored in an Example criteria, I have to do the following:
if an identifier was specified
find by identifier
else
find by criteria
I'd like to better understand why the identifier is ignored on criteria queries, and if I'd be breaking anything else if I attempt to override this behavior.
Thanks,
-Mike Monette
|