You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2013/06/28 16:08:20 UTC
[jira] [Assigned] (CAMEL-6498) Improvement to allow passing in a
parameter to a NamedQuery via Camel JPA
[ https://issues.apache.org/jira/browse/CAMEL-6498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang reassigned CAMEL-6498:
-----------------------------------
Assignee: Willem Jiang
> Improvement to allow passing in a parameter to a NamedQuery via Camel JPA
> -------------------------------------------------------------------------
>
> Key: CAMEL-6498
> URL: https://issues.apache.org/jira/browse/CAMEL-6498
> Project: Camel
> Issue Type: Improvement
> Components: camel-jpa
> Affects Versions: 2.10.3
> Environment: Camel-JPA component deployed inside Karaf OSGi container
> Java 1.6
> Reporter: Joe Luo
> Assignee: Willem Jiang
>
> I have an Entity definition as below:
> {code}
> @Entity
> @Table(name="TIMESHEET")
> @NamedQuery(name = "getTimesheetById", query = "select t from TimesheetEntity t where t.id = :timesheetId ")
> public class TimesheetEntity extends BaseObject {
> @Id
> @GeneratedValue(strategy= GenerationType.AUTO)
> private Long id;
> Long userId;
> ...
> {code}
> And my camel route camel-jpa uri looks like:
> {code}
> <to uri="jpa://com.mycompany.persistence.TimesheetEntity?consumeDelete=false&consumer.namedQuery=getTimesheetById"/>
> {code}
> Now, I would like to pass in the ":timesheetId" parameter to the NamedQuery, for instance "timesheetId=12345". Unfortunately, it is not possible to dynamically pass the parameter to the NamedQuery in a camel route at the moment.
> It does look like that there were some other users tried to find a solution to the same problem so at least it is a common use case.
> We should allow passing in a parameter to a NamedQuery via Camel JPA.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira