You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-user@db.apache.org by Kevin Roll <kr...@appropel.com> on 2009/07/01 18:10:32 UTC
Query by Criteria
Are there any plans to add Query by Criteria to the JDO standard? I'm
referring to a programmatic API to build queries, similar to what
Hibernate already has and JPA is planning to add.
If not, does anyone know of another route to achieving this
functionality? Are there any libraries that can be layered over JDO to
get this? Should I write my own?
Thanks for any insight.
Re: Query by Criteria
Posted by Kevin Roll <kr...@appropel.com>.
On Jul 1, 2009, at 12:22 PM, Andy Jefferson wrote:
>> QueryDSL already does that for JDOQL
> http://source.mysema.com/display/querydsl/Querydsl
Thanks for the pointer, Andy. QueryDSL looks cool but I'm not certain
it's exactly what I'm looking for. In fact, their type-safe objects
may be too extreme for my purposes.
My general use case is that I present a GUI to the user with a large
number of potential search criteria. When they hit the search criteria
I want to build a query based upon what they have entered/selected.
This query may involve complex nesting of ands and ors, which is one
of the main problems I am trying to solve. I have hacked together
something that generally works and is able to translate into a JDOQL
query, but I was hoping that better minds had looked at the issue.
Usually I am building the query on the fly - I rarely do preassembled
queries based upon a specific query class.
Re: Query by Criteria
Posted by Andy Jefferson <an...@datanucleus.org>.
> Are there any plans to add Query by Criteria to the JDO standard? I'm
> referring to a programmatic API to build queries, similar to what
> Hibernate already has and JPA is planning to add.
>
> If not, does anyone know of another route to achieving this
> functionality? Are there any libraries that can be layered over JDO to
> get this? Should I write my own?
QueryDSL already does that for JDOQL
http://source.mysema.com/display/querydsl/Querydsl
I'm sure the guys who wrote it would love to hear feedback ;-)
--
Andy
DataNucleus (http://www.datanucleus.org)