Skip to content

Commit

Permalink
Update api/src/main/java/jakarta/data/repository/Insert.java
Browse files Browse the repository at this point in the history
Co-authored-by: Nathan Rauh <[email protected]>
  • Loading branch information
otaviojava and njr-11 authored Oct 11, 2023
1 parent ed94956 commit 776a02b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions api/src/main/java/jakarta/data/repository/Insert.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@
* <p>After invoking this method, it is recommended not to use the entity value supplied as a parameter, as this method
* makes no guarantees about the state of the entity value after insertion.
* </p>
* <p>If the entity uses optimistic locking, and the version differs from the version in the database, an
* {@link jakarta.data.exceptions.OptimisticLockingFailureException} may be thrown.
* <p>If an entity of this type with the same unique identifier already exists in the database
* and the databases performs ACID (atomic, consistent, isolated, durable) transactions,
* then annotated method raises {@link jakarta.data.exceptions.EntityExistsException}.
* In databases that follow the BASE model or use an append model to write data,
* this exception is not thrown.
* </p>
* <p>For example, consider an interface representing a garage:</p>
* <pre>
Expand Down

0 comments on commit 776a02b

Please sign in to comment.