Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Talk:EclipseLink/Development/2.4.0/JPA-RS/REST-API"
Line 11: | Line 11: | ||
--[[User:Tom.ware.oracle.com|Tom.ware.oracle.com]] 15:24, 21 December 2011 (UTC) | --[[User:Tom.ware.oracle.com|Tom.ware.oracle.com]] 15:24, 21 December 2011 (UTC) | ||
* Should we try to guarantee itempotency on PUT? | * Should we try to guarantee itempotency on PUT? | ||
− | ** A check for sequencing and | + | ** A check for sequencing and then a does exist query? |
Revision as of 11:25, 21 December 2011
--Tom.ware.oracle.com 15:24, 21 December 2011 (UTC) 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.
--Tom.ware.oracle.com 15:24, 21 December 2011 (UTC)
- Should we try to guarantee itempotency on PUT?
- A check for sequencing and then a does exist query?