camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abhi <iloveabhi...@rediffmail.com>
Subject Update database using openJpa in camel route
Date Fri, 14 Jun 2013 08:17:40 GMT
HI.I am persisting data into SQL Server using openJPA in camel route. My
route is as follows						     ${in.header.employeeSummaryListCount}			     			     		
*Problem:*
*/ Open JPA always tries to do INSERT onto table. What I want is, if row
already exist then execute UPDATE query*./
Can anybody tell me how to do that?I even tried to use 'usePersist' as given
on (http://camel.apache.org/jpa.html) but it didn't helped.<to
uri=&quot;jpa:com.test.EmployeeSummary&lt;b>?usePersist=true*>usePersist
false	Camel 2.5: JPA producer only: Indicates to use
entityManager.persist(entity) instead of entityManager.merge(entity). Note:
entityManager.persist(entity) doesn't work for detached entities (where the
EntityManager has to execute an UPDATE instead of an INSERT query)! Thanks &
Regards,ABhi



--
View this message in context: http://camel.465427.n5.nabble.com/Update-database-using-openJpa-in-camel-route-tp5734198.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message