I agree that JPA can be clunky. I have found the CriteriaBuilder way of
building queries to be manageable (if a bit verbose). So far, I’ve used JQL
queries (defined in @NamedQuery annotations) for the queries that have a
well-defined structure, and CriteriaBuilder for the more complex cases
(such as filtering by a user-defined set of parameters). My use cases have
been relatively simple, though.

-Chris


On Tue, Apr 15, 2014 at 8:49 AM, William Speirs <wspe...@apache.org> wrote:

> I hadn't heard of it. There are a few ORMs out there. I've looked at this
> library as well: http://jdbi.org/ However, that's a bit too much SQL
> writing for just the basic objects for me. Though it is a GREAT setup to
> make unit testing REALLY easy.
>
> I just find the JPA API so clumsy, especially when building dynamic
> queries. Even Hibernate's "native" interface is MUCH better than JPA.
>
> Bill-
>
>
> On Tue, Apr 15, 2014 at 3:26 AM, Martin Grigorov <mgrigo...@apache.org
> >wrote:
>
> > what do you think about JOOQ ?
> >
> >
> >
> http://www.petrikainulainen.net/programming/jooq/using-jooq-with-spring-crud/
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> >
> >
> > On Tue, Apr 15, 2014 at 6:00 AM, William Speirs <wspe...@apache.org>
> > wrote:
> >
> > > Off-topic a bit... on the JPA front, I'm still relatively new and
> finding
> > > it not as useful as I would have hoped. Beyond VERY simple
> > > read-by-primary-key and update/create/delete, anything else seems
> > tedious.
> > > I'm having to learn the JPA query language (yes, you can use SQL but
> then
> > > you lose generics/typing). I'm highly considering updating another one
> of
> > > my projects SOP4J-DBUTILS (https://github.com/wspeirs/sop4j-dbutils)
> to
> > > handle JPA annotations for the basic CRUD operations, then just making
> it
> > > slightly easier to use complex where clauses to populate POJOs.
> > >
> > > Thoughts?
> > >
> > > Bill-
> > >
> > > P.S. We should probably take this off the Wicket list if folks want to
> > > continue discussing...
> > >
> > >
> > >
> > > On Mon, Apr 14, 2014 at 9:03 AM, Chris Snyder <
> chris.sny...@biologos.org
> > > >wrote:
> > >
> > > > Thanks for the reply - no worries on the delay.
> > > >
> > > > In my case, I'm using EclipseLink. I originally was using Hibernate,
> > but
> > > > switched after encountering a known bug in Hibernate (the specifics
> of
> > > > which I no longer recall). Since I was sticking to using the pure JPA
> > > API,
> > > > it was a quick drop-in replacement. Recently, however, I have used a
> > > couple
> > > > of EclipseLink-specific features, so it wouldn't be as quick to
> switch
> > > back
> > > > (assuming that the bug in Hibernate has been fixed).
> > > >
> > > > This certainly wouldn't stop me from checking out Croquet - if I end
> up
> > > > adapting it to use EclipseLink, I'll be sure to share my changes.
> > > >
> > > > Best,
> > > > Chris
> > > >
> > > >
> > > > On Mon, Apr 14, 2014 at 8:44 AM, Bill Speirs <bill.spe...@gmail.com>
> > > > wrote:
> > > >
> > > > > Chris, sorry for not responding more quickly... was traveling back
> > from
> > > > > ApacheCon NA.
> > > > >
> > > > > Honestly, it would be non-trivial to drop in a replacement to
> > > Hibernate.
> > > > > The JpaPersistService (http://goo.gl/FeI6xU) handles the
> > configuration
> > > > > coming from persistence.xml and has nothing Hibernate specific. The
> > > > problem
> > > > > is the CroquetPersistService, DataSourceHibernateModule, and
> > > > > EntityManagerProxyFactory classes.
> > > > >
> > > > > What JPA provider would you rather use? I've never used anything
> but
> > > > > Hibernate, and never had issues with it... just curious why you'd
> > like
> > > to
> > > > > use something else.
> > > > >
> > > > > Also, patches/pull requests are always happily accepted :-)
> > > > >
> > > > > Thanks for checking it out...
> > > > >
> > > > > Bill-
> > > > >
> > > > >
> > > > > On Wed, Apr 9, 2014 at 1:05 PM, Chris Snyder <
> > > chris.sny...@biologos.org
> > > > > >wrote:
> > > > >
> > > > > > Looks like awesome work - very clean page design and excellent
> > > > > > documentation, and I'm sure that the quality extends to the code
> as
> > > > well.
> > > > > > I'll definitely be looking into this for my next project, if not
> > > > porting
> > > > > > some of my current ones.
> > > > > >
> > > > > > When using Croquet, how easy would it be to drop in a different
> JPA
> > > > > > implementation in place of Hibernate?
> > > > > >
> > > > > > Best,
> > > > > > Chris
> > > > > >
> > > > > >
> > > > > > On Wed, Apr 9, 2014 at 12:51 PM, William Speirs <
> > wspe...@apache.org>
> > > > > > wrote:
> > > > > >
> > > > > > > I gave a talk at ApacheCon NA yesterday on Croquet. It is a
> > > > combination
> > > > > > of
> > > > > > > Wicket, Jetty, Hibernate, and Guice to make it super-easy to
> > start
> > > > > > writing
> > > > > > > Wicket code almost immediately, instead of spending time
> > > configuring
> > > > > > > everything.
> > > > > > >
> > > > > > > Slides:
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://docs.google.com/presentation/d/1m3jdbpYoSBOCPz8Wes9mPvhf8TLp_3dndj_gW08iFL8/
> > > > > > > Code: https://github.com/metrink/croquet
> > > > > > > Docs: http://croquet.metrink.com
> > > > > > >
> > > > > > > Thanks...
> > > > > > >
> > > > > > > Bill-
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Chris Snyder
> > > > Web Developer, BioLogos
> > > > 616.328.5218 x203
> > > > biologos.org
> > > >
> > >
> >
>

Reply via email to