Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Talk:EclipseLink/Development/2.4.0/JPA-RS/REST-API"

(New page: * PUT should not be used for INSERT. PUT is supposed to be itempotent and because of the possibility of sequencing, creates are not itempotent. ** We should use PUT for update ** We shoul...)
 
Line 2: Line 2:
 
** We should use PUT for update
 
** We should use PUT for update
 
** We should use POST for insert
 
** We should use POST for insert
 +
 +
--[[User:Douglas.clarke.oracle.com|Doug]] 15:18, 21 December 2011 (UTC) This should relate to JPA and therefore:
 +
* POST == EntityManager.persist
 +
* PUT == EntityManager.merge
 +
 +
The side-effect of this is that a merge of a new entity can result in an INSERT.

Revision as of 11:18, 21 December 2011

  • PUT should not be used for INSERT. PUT is supposed to be itempotent and because of the possibility of sequencing, creates are not itempotent.
    • We should use PUT for update
    • We should use POST for insert

--Doug 15:18, 21 December 2011 (UTC) This should relate to JPA and therefore:

  • POST == EntityManager.persist
  • PUT == EntityManager.merge

The side-effect of this is that a merge of a new entity can result in an INSERT.

Back to the top