On Thu, Oct 29, 2009 at 7:43 PM, DRy <[email protected]> wrote:
>
> Hi,
>
> I defined two named-queries in my orm.xml:
>
> <named-query name="findAll">
>    <query>SELECT c FROM Customer c</query>
> </named-query>
> <named-query name="findByOid">
>    <query>SELECT c FROM Customer c WHERE c.oid = :oid</query>
> </named-query>
>
> I can use the "findAll" named-query to consume customer-objects
>
>
> from("jpa:com.test.entity.Customer?consumer.namedQuery=findAll&delay=10000&consumeLockEntity=true&consumeDelete=true")
>
> but how can I pass parameter(s) to the "findByOid" named-query ... ?
> :confused:
>
> Sorry if this might be a beginner question ... :working:
> --

See the unit tests of camel-jpa, for example JpaWithNamedQueryTest
It could maybe inspire you.


> View this message in context: 
> http://www.nabble.com/JPA%3A-How-to-pass-parameters-to-namedQuery-tp26118566p26118566.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to