Hi Have you tried the sql component it can map to objects also http://camel.apache.org/sql-component
On Tue, Apr 21, 2015 at 12:11 AM, ablevine1 <ablevi...@gmail.com> wrote: > I see this post is from about a year ago and have not been able to find any > other information regarding updates on this kind of use case. Does anyone > know if there are any new capabilities or plans to add them that would allow > a webservice to pull data via the jpa component? > > It would be really great to be able to support full CRUD operations using > only the REST DSL and JPA. Currently it is easy to support POST/CREATE via > code like the following: > <post type="com.bn.model.User" id="createUser"> > <to uri="jpa://com.bn.model.User" /> > </post> > > however, it does not appear work for RETRIEVE/GET operations like > <get uri="/list" outType="com.bn.model.User[]"> > <to uri="jpa:com.bn.model.User?consumer.query=from com.bn.model.User"/> > </get> > > OR > > <get uri="/{id}" outType="com.bn.model.User"> > <to uri="jpa:com.bn.model.User?consumer.query=from com.bn.model.User u > where u.id = ${header.id}"/> > </get> > > > To work around it you either need to use the jdbc component, as mentioned, > which does not allow you to map to POJOs or alternatively, to use a bean > that then does the data access. > Should I make a feature request for this functionality, or is something > along these lines potentially already in the works? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Hibernate-with-restlet-tp5734306p5766083.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/