camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett E. Meyer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-7550) Adding ability to look up objects using EntityManager.find in JPA component.
Date Sun, 07 Jan 2018 03:40:00 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-7550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16315053#comment-16315053
] 

Brett E. Meyer commented on CAMEL-7550:
---------------------------------------

Happy to help with this, but my original thinking about camel-jpa's consumer is inline with
[~dariusx].  Can anyone suggest use cases where this would be helpful?

> Adding ability to look up objects using EntityManager.find in JPA component.
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-7550
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7550
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jpa
>            Reporter: Knut-HÃ¥vard Aksnes
>            Priority: Minor
>             Fix For: Future
>
>
> Currently Camel-JPA offers 3 different ways of looking up objects
> # Using Query
> # Using NativeQuery
> # Using NamedQuery
> I would like a fourth: Using EntityManager.find
> EntityManager.find is simple to use and in many situations far more efficient out of
the box than the other options, at least when using Hibernate. This is due to the fact that
it uses the caches by default.
> The find method requires two arguments, one of them the key is natural to provide as
incoming body, the second, the class of the object wanted is natural to have as a route parameter
and/or header.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message