Have Y'all Seen This?
- View Source
- View Source--- In email@example.com, Jing Xue <jingxue@...> wrote:
> +1. Same applies to Hibernate's criteria API, which is absolutelyHi,
> great for constructing dynamic queries, but also plagued by the same
> coupling issue. I have always wished there were a JSR for a standard
> criteria or predicate API. (I mean considering we even have one for
> the measurement units, right? 8-) )
This is true, but is probably a less important issue. In a way,
Criterias are matching the objectives of the DDD Specification
pattern, but are implicitly dependent on the Hibernate implementation,
even if on a higher level of abstraction compared to HQL. But looks
like defining an abstract version of a Specification whose
implementation is a Hibernate criteria is unnecessary complication
most of the time. If Spring or the like abstracts Criterias the way
they did with DAOs, would look just fine to me.