From: Gavin_King/Cirrus%<CI...@ci...> - 2002-08-07 01:27:04
|
I think I need to break something :( Very early on in the project, when Hibernate queries just returned a single-column result sets containing entities, I made a decision to have Hibernate always return distinct result sets. It sort of made sense at the time but now that Hibernate queries can return all sorts of stuff, it no longer makes much sense.... This was not a very well-thought out decision, actually. What I would really like to do is push responsibility for this into the application by allowing the DISTINCT keyword in the Hiberante query and remove the select="distinct|all" mapping attribute. Unfortunately, this change would break existing code that assumes a distinct result set from a query without an explicit "DISTINCT". On the other hand, it would allow more flexibility for the user, be more predictable (clearer semantics) and simplify the implementation. No more hidden magic to trim a non-distinct SQL resultset to a distinct Hibernate result set. what does everyone think about this change? |