camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ablevine1 <>
Subject Re: Hibernate with restlet
Date Sun, 26 Apr 2015 22:35:29 GMT
Thank you Claus. The SQL component works great for my use case, although I
can see where there would a few minor drawbacks to using it versus updating
the JPA component to work in a similar fashion (Perhaps something I could
contribute to if I get the time).

1. In my use case, my database fields are not named the same as the fields
in my bean, which requires me to always select all of the fields and use
"select x as y" statements to rename the queried values so that they match
the name of the setters on my POJO.  This adds slightly more room for error
as you have to do this for every query for the given entity.  If JPA was
being used the column name mapping would be done only once when annotating
the entity POJO.

2.  If I want to have my queried entity have a relation to other objects
that are also loaded in the query things will get more complex.  E.g, a User
has a collection of Address objects and I want to return User object
containing that Address collection. That could get pretty tricky to do with
the sql-component (I'm not sure whether or not its supported) whereas JPA
would handle that mapping for you.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message