java - What does MAX aggregation on an entity identification variable do? -
i'm trying migrate old code uses jpa 1.0 , hibernate 3.3 (yes, it's really old) different (non-sql) data api. 1 of queries looks this:
select tx.transactionid, max(tx), sum(tx.amount) transaction tx tx.customerid = :customerid , ... // etc group tx.transactionid
my question: what should result of max(tx)
be? of documentation i've seen claims max
valid comparable scalar values (numbers, strings, dates), not entity references. context, query in fact returns instances of transaction
, can't tell instance (specific persisted entities? composite entities of kind?) or how relate grouped result sets.
is hibernate extension spec? couldn't find in hibernate docs either, , wasn't able locate code in hibernate sources deals specific behavior. don't care either way (since have rewrite entire call in different manner anyway), know replacement should do.
anybody recognize this?
Comments
Post a Comment