Re: [hibernate-dev] Hibernate Disjunction Criteria broken: returns true for empty list of criteria

2008-10-30 Thread Adam Warski
Hello, When you form a Hibernate Disjunction criteria, but don't add any clauses to it, you get a criteria that matches everything. Generally, when you perform a reduction over an empty list, the expected result is the identity element for the reduction. For example, the sum of the empty list i

Re: [hibernate-dev] Hibernate Disjunction Criteria broken: returns true for empty list of criteria

2008-10-30 Thread Darryl Miles
Ahead of my claim is that an empty Junction in Criteria API is really a programming concern (possibly a programming/usage error). I understand your point of view of the way you might expect it to work if you were creating an SQL query builder and wanted to deal with the empty junction situat

Re: [hibernate-dev] Hibernate Disjunction Criteria broken: returns true for empty list of criteria

2008-10-30 Thread William Pugh
> > Yes the whole point of all WHERE clauses is to filter/reduce the available > data-set. I see this point of view but... No, the point of a where clause it to give you the data you want. A query that gives me no results back is far more useful and common than a query that materializes my entir