camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Mueller (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-2982) camel-jpa should support an option to switch from EntityManager.merge(entity) to EntityManager.persist(entity)
Date Fri, 23 Jul 2010 07:56:52 GMT

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

Christian Mueller commented on CAMEL-2982:
------------------------------------------

Done. I thought of it, 5 minutes after saving the page and sitting in my
car... :o)


> camel-jpa should support an option to switch from EntityManager.merge(entity) to EntityManager.persist(entity)
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2982
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2982
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jpa
>    Affects Versions: 2.4.0
>         Environment: All
>            Reporter: Christian Mueller
>            Assignee: Christian Mueller
>             Fix For: 2.5.0
>
>
> If you use a 'heavy' normalized database schema, the switch from EntityManager.merge(entity)
to EntityManager.persist(entity) could bring a performance boost.
> The reason is, that by using EntityManager.merge(entity) the EntityManager will query
the database for each entity if this entity already exists in the database. EntityManager.persist(entity)
doesn't query the database before the entity is persisted.
> In our case, the entities are all new entities, if the Id is null and we think we could
improve our throughput with this improvement.
> Christian

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message