File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
hibernate-core/src/main/java/org/hibernate Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 1717
1818/**
1919 * Specifies that the value of the annotated property is generated by the
20- * database. The generated value will be automatically retrieved using a
21- * SQL {@code select} after it is generated.
20+ * database. The generated value is automatically retrieved after it is
21+ * generated.
22+ * <p>
23+ * Retrieval of the generated value might require an additional SQL
24+ * {@code select} statement, but this not necessary if:
25+ * <ul>
26+ * <li>
27+ * the SQL dialect of the database
28+ * {@linkplain org.hibernate.dialect.Dialect#supportsInsertReturning
29+ * supports} {@code returning} or {@code select from final table}, or
30+ * <li>
31+ * the JDBC driver
32+ * {@linkplain org.hibernate.dialect.Dialect#supportsInsertReturningGeneratedKeys
33+ * provides} a similar capability via {@code getGeneratedKeys()}.
34+ * </ul>
2235 * <p>
2336 * {@code @Generated} relieves the program of the need to explicitly call
2437 * {@link org.hibernate.Session#refresh(Object) refresh()} to synchronize
Original file line number Diff line number Diff line change @@ -4242,8 +4242,8 @@ public boolean supportsSubqueryInSelect() {
42424242 * <p>
42434243 * Support for identity columns is insufficient here, we require something like:
42444244 * <ol>
4245- * <li>{@code insert ... returning ...}
4246- * <li>{@code select from final table (insert ... )}
4245+ * <li>{@code insert ... returning ...}, or
4246+ * <li>{@code select from final table (insert ... )}.
42474247 * </ol>
42484248 *
42494249 * @return {@code true} if {@link org.hibernate.id.insert.InsertReturningDelegate}
You can’t perform that action at this time.
0 commit comments