Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,21 @@

/**
* Specifies that the value of the annotated property is generated by the
* database. The generated value will be automatically retrieved using a
* SQL {@code select} after it is generated.
* database. The generated value is automatically retrieved after it is
* generated.
* <p>
* Retrieval of the generated value might require an additional SQL
* {@code select} statement, but this not necessary if:
* <ul>
* <li>
* the SQL dialect of the database
* {@linkplain org.hibernate.dialect.Dialect#supportsInsertReturning
* supports} {@code returning} or {@code select from final table}, or
* <li>
* the JDBC driver
* {@linkplain org.hibernate.dialect.Dialect#supportsInsertReturningGeneratedKeys
* provides} a similar capability via {@code getGeneratedKeys()}.
* </ul>
* <p>
* {@code @Generated} relieves the program of the need to explicitly call
* {@link org.hibernate.Session#refresh(Object) refresh()} to synchronize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4242,8 +4242,8 @@ public boolean supportsSubqueryInSelect() {
* <p>
* Support for identity columns is insufficient here, we require something like:
* <ol>
* <li>{@code insert ... returning ...}
* <li>{@code select from final table (insert ... )}
* <li>{@code insert ... returning ...}, or
* <li>{@code select from final table (insert ... )}.
* </ol>
*
* @return {@code true} if {@link org.hibernate.id.insert.InsertReturningDelegate}
Expand Down
Loading