posted 11 years ago
If I understand correctly, I think you are trying to evaluate condition at the database layer. Isn't the condition a part of business layer ? The job of the lowest layer of ORM must be to execute a query. Which query has to be executed must be decided at the business layer. In short, you can use count(*) to evaluate the ccondition and use the ORM to execute the query.
Thanks,
Tushar (SCJP 1.5)