You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To inject the default Persistence Context, you can use the http://docs.oracle.com/javaee/7/api/javax/persistence/PersistenceContext.html[`@PersistenceContext`] annotation.
255
+
To inject the default Persistence Context, you can use the https://javaee.github.io/javaee-spec/javadocs/javax/persistence/PersistenceContext.html[`@PersistenceContext`] annotation.
When using http://docs.oracle.com/javaee/7/api/javax/persistence/CacheStoreMode.html#REFRESH[`CacheStoreMode.REFRESH`] or https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/CacheMode.html#REFRESH[`CacheMode.REFRESH`] in conjunction with the region you have defined for the given query,
379
+
When using https://javaee.github.io/javaee-spec/javadocs/javax/persistence/CacheStoreMode.html#REFRESH[`CacheStoreMode.REFRESH`] or https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/CacheMode.html#REFRESH[`CacheMode.REFRESH`] in conjunction with the region you have defined for the given query,
380
380
Hibernate will selectively force the results cached in that particular region to be refreshed.
381
381
382
382
This is particularly useful in cases where underlying data may have been updated via a separate process
Traditionally, Hibernate defined the https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/CacheMode.html[`CacheMode`] enumeration to describe
395
395
the ways of interactions with the cached data.
396
-
JPA split cache modes by storage (http://docs.oracle.com/javaee/7/api/javax/persistence/CacheStoreMode.html[`CacheStoreMode`])
397
-
and retrieval (http://docs.oracle.com/javaee/7/api/javax/persistence/CacheRetrieveMode.html[`CacheRetrieveMode`]).
396
+
JPA split cache modes by storage (https://javaee.github.io/javaee-spec/javadocs/javax/persistence/CacheStoreMode.html[`CacheStoreMode`])
397
+
and retrieval (https://javaee.github.io/javaee-spec/javadocs/javax/persistence/CacheRetrieveMode.html[`CacheRetrieveMode`]).
398
398
399
399
The relationship between Hibernate and JPA cache modes can be seen in the following table:
http://docs.oracle.com/javaee/7/api/javax/persistence/OrderBy.html[`@OrderBy`] annotation allows you to specify the entity attributes used for sorting
417
+
https://javaee.github.io/javaee-spec/javadocs/javax/persistence/OrderBy.html[`@OrderBy`] annotation allows you to specify the entity attributes used for sorting
418
418
when fetching the current annotated collection, the Hibernate specific
419
419
https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/annotations/OrderBy.html[`@OrderBy`] annotation is used to specify a *SQL* clause instead.
to override the default column names defined by the Embeddable.
101
101
102
102
Considering you have the following `Publisher` embeddable type
@@ -204,13 +204,13 @@ Embeddable types that are used as collection entries, map keys or entity type id
204
204
205
205
The https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/annotations/Target.html[`@Target`] annotation is used to specify the implementation class of a given association that is mapped via an interface.
feature a http://docs.oracle.com/javaee/7/api/javax/persistence/ManyToOne.html#targetEntity--[`targetEntity`] attribute to specify the actual class of the entity association when an interface is used for the mapping.
feature a https://javaee.github.io/javaee-spec/javadocs/javax/persistence/ManyToOne.html#targetEntity--[`targetEntity`] attribute to specify the actual class of the entity association when an interface is used for the mapping.
212
212
213
-
The http://docs.oracle.com/javaee/7/api/javax/persistence/ElementCollection.html[`@ElementCollection`] association has a http://docs.oracle.com/javaee/7/api/javax/persistence/ElementCollection.html#targetClass--[`targetClass`] attribute for the same purpose.
213
+
The https://javaee.github.io/javaee-spec/javadocs/javax/persistence/ElementCollection.html[`@ElementCollection`] association has a https://javaee.github.io/javaee-spec/javadocs/javax/persistence/ElementCollection.html#targetClass--[`targetClass`] attribute for the same purpose.
214
214
215
215
However, for simple embeddable types, there is no such construct and so you need to use the Hibernate-specific `@Target` annotation instead.
Copy file name to clipboardExpand all lines: documentation/src/main/asciidoc/userguide/chapters/domain/entity.adoc
+2-2
Original file line number
Diff line number
Diff line change
@@ -113,9 +113,9 @@ Hibernate offers multiple identifier generation strategies, see the <<chapters/d
113
113
[[entity-pojo-mapping]]
114
114
==== Mapping the entity
115
115
116
-
The main piece in mapping the entity is the http://docs.oracle.com/javaee/7/api/javax/persistence/Entity.html[`javax.persistence.Entity`] annotation.
116
+
The main piece in mapping the entity is the https://javaee.github.io/javaee-spec/javadocs/javax/persistence/Entity.html[`javax.persistence.Entity`] annotation.
117
117
118
-
The `@Entity` annotation defines just the https://docs.oracle.com/javaee/7/api/javax/persistence/Entity.html#name--[`name`] attribute which is used to give a specific entity name for use in JPQL queries.
118
+
The `@Entity` annotation defines just the https://javaee.github.io/javaee-spec/javadocs/javax/persistence/Entity.html#name--[`name`] attribute which is used to give a specific entity name for use in JPQL queries.
119
119
120
120
By default, if the name attribute the `@Entity` annotation is missing, the unqualified name of the entity class itself will be used as the entity name
Copy file name to clipboardExpand all lines: documentation/src/main/asciidoc/userguide/chapters/domain/identifiers.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -351,7 +351,7 @@ If no table name is given Hibernate assumes an implicit name of `hibernate_seque
351
351
Additionally, because no `javax.persistence.TableGenerator#pkColumnValue` is specified,
352
352
Hibernate will use the default segment (`sequence_name='default'`) from the hibernate_sequences table.
353
353
354
-
However, you can configure the table identifier generator using the http://docs.oracle.com/javaee/7/api/javax/persistence/TableGenerator.html[`@TableGenerator`] annotation.
354
+
However, you can configure the table identifier generator using the https://javaee.github.io/javaee-spec/javadocs/javax/persistence/TableGenerator.html[`@TableGenerator`] annotation.
Copy file name to clipboardExpand all lines: documentation/src/main/asciidoc/userguide/chapters/fetching/Fetching.adoc
+2-2
Original file line number
Diff line number
Diff line change
@@ -221,7 +221,7 @@ An EntityGraph is the root of a "load plan" and must correspond to an EntityType
221
221
==== JPA (key) subgraphs
222
222
223
223
A sub-graph is used to control the fetching of sub-attributes of the AttributeNode it is applied to.
224
-
It is generally defined via the http://docs.oracle.com/javaee/7/api/javax/persistence/NamedSubgraph.html[`@NamedSubgraph`] annotation.
224
+
It is generally defined via the https://javaee.github.io/javaee-spec/javadocs/javax/persistence/NamedSubgraph.html[`@NamedSubgraph`] annotation.
225
225
226
226
If we have a `Project` parent entity which has an `employees` child associations,
227
227
and we'd like to fetch the `department` for the `Employee` child association.
@@ -589,7 +589,7 @@ The possible values are given by the `https://docs.jboss.org/hibernate/orm/{majo
589
589
`FALSE`:: Eagerly load it.
590
590
`EXTRA`:: Prefer extra queries over full collection loading.
591
591
592
-
The `TRUE` and `FALSE` values are deprecated since you should be using the JPA http://docs.oracle.com/javaee/7/api/javax/persistence/FetchType.html[`FetchType`] attribute of the <<annotations-jpa-elementcollection>>, <<annotations-jpa-onetomany>>, or <<annotations-jpa-manytomany>> collection.
592
+
The `TRUE` and `FALSE` values are deprecated since you should be using the JPA https://javaee.github.io/javaee-spec/javadocs/javax/persistence/FetchType.html[`FetchType`] attribute of the <<annotations-jpa-elementcollection>>, <<annotations-jpa-onetomany>>, or <<annotations-jpa-manytomany>> collection.
593
593
594
594
The `EXTRA` value has no equivalent in the JPA specification, and it's used to avoid loading the entire collection even when the collection is accessed for the first time.
595
595
Each element is fetched individually using a secondary query.
Copy file name to clipboardExpand all lines: documentation/src/main/asciidoc/userguide/chapters/locking/Locking.adoc
+2-2
Original file line number
Diff line number
Diff line change
@@ -312,7 +312,7 @@ Hibernate always uses the locking mechanism of the database, and never lock obje
312
312
=== `LockMode` and `LockModeType`
313
313
314
314
Long before JPA 1.0, Hibernate already defined various explicit locking strategies through its `LockMode` enumeration.
315
-
JPA comes with its own http://docs.oracle.com/javaee/7/api/javax/persistence/LockModeType.html[`LockModeType`] enumeration which defines similar strategies as the Hibernate-native `LockMode`.
315
+
JPA comes with its own https://javaee.github.io/javaee-spec/javadocs/javax/persistence/LockModeType.html[`LockModeType`] enumeration which defines similar strategies as the Hibernate-native `LockMode`.
@@ -351,7 +351,7 @@ This ensures that applications are portable.
351
351
JPA 2.0 introduced two query hints:
352
352
353
353
javax.persistence.lock.timeout:: it gives the number of milliseconds a lock acquisition request will wait before throwing an exception
354
-
javax.persistence.lock.scope:: defines the http://docs.oracle.com/javaee/7/api/javax/persistence/PessimisticLockScope.html[_scope_] of the lock acquisition request.
354
+
javax.persistence.lock.scope:: defines the https://javaee.github.io/javaee-spec/javadocs/javax/persistence/PessimisticLockScope.html[_scope_] of the lock acquisition request.
355
355
The scope can either be `NORMAL` (default value) or `EXTENDED`. The `EXTENDED` scope will cause a lock acquisition request to be passed to other owned table structured (e.g. `@Inheritance(strategy=InheritanceType.JOINED)`, `@ElementCollection`)
Copy file name to clipboardExpand all lines: documentation/src/main/asciidoc/userguide/chapters/pc/PersistenceContext.adoc
+2-2
Original file line number
Diff line number
Diff line change
@@ -1283,7 +1283,7 @@ Certain methods of the JPA `EntityManager` or the Hibernate `Session` will not l
1283
1283
1284
1284
Rolling back the database transaction does not put your business objects back into the state they were at the start of the transaction. This means that the database state and the business objects will be out of sync. Usually, this is not a problem because exceptions are not recoverable and you will have to start over after rollback anyway.
1285
1285
1286
-
The JPA https://docs.oracle.com/javaee/7/api/javax/persistence/PersistenceException.html[`PersistenceException`] or the
1286
+
The JPA https://javaee.github.io/javaee-spec/javadocs/javax/persistence/PersistenceException.html[`PersistenceException`] or the
1287
1287
https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/HibernateException.html[`HibernateException`] wraps most of the errors that can occur in a Hibernate persistence layer.
1288
1288
1289
1289
Both the `PersistenceException` and the `HibernateException` are runtime exceptions because, in our opinion, we should not force the application developer to catch an unrecoverable exception at a low layer. In most systems, unchecked and fatal exceptions are handled in one of the first frames of the method call stack (i.e., in higher layers) and either an error message is presented to the application user or some other appropriate action is taken. Note that Hibernate might also throw other unchecked exceptions that are not a `HibernateException`. These are not recoverable either, and appropriate action should be taken.
@@ -1326,7 +1326,7 @@ SQLGrammarException::
1326
1326
[NOTE]
1327
1327
====
1328
1328
Starting with Hibernate 5.2, the Hibernate `Session` extends the JPA `EntityManager`. For this reason, when a `SessionFactory` is built via Hibernate's native bootstrapping,
1329
-
the `HibernateException` or `SQLException` can be wrapped in a JPA https://docs.oracle.com/javaee/7/api/javax/persistence/PersistenceException.html[`PersistenceException`] when thrown
1329
+
the `HibernateException` or `SQLException` can be wrapped in a JPA https://javaee.github.io/javaee-spec/javadocs/javax/persistence/PersistenceException.html[`PersistenceException`] when thrown
1330
1330
by `Session` methods that implement `EntityManager` methods (e.g., https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/Session.html#merge-java.lang.Object-[Session.merge(Object object)],
As you can see, there is no SQL `UPDATE` being executed.
1931
1931
1932
-
You can also pass the read-only hint to named queries using the JPA http://docs.oracle.com/javaee/7/api/javax/persistence/QueryHint.html[`@QueryHint`] annotation.
1932
+
You can also pass the read-only hint to named queries using the JPA https://javaee.github.io/javaee-spec/javadocs/javax/persistence/QueryHint.html[`@QueryHint`] annotation.
1933
1933
1934
1934
[[jpa-read-only-entities-native-example]]
1935
1935
.Fetching read-only entities using a named query and the read-only hint
Copy file name to clipboardExpand all lines: documentation/src/main/asciidoc/userguide/chapters/query/native/Native.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -840,7 +840,7 @@ For SQL Server, if you can enable `SET NOCOUNT ON` in your procedure it will pro
840
840
=== Using named queries to call stored procedures
841
841
842
842
Just like with SQL statements, you can also use named queries to call stored procedures.
843
-
For this purpose, JPA defines the http://docs.oracle.com/javaee/7/api/javax/persistence/NamedStoredProcedureQuery.html[`@NamedStoredProcedureQuery`] annotation.
843
+
For this purpose, JPA defines the https://javaee.github.io/javaee-spec/javadocs/javax/persistence/NamedStoredProcedureQuery.html[`@NamedStoredProcedureQuery`] annotation.
The http://docs.oracle.com/javaee/7/api/javax/persistence/UniqueConstraint.html[`@UniqueConstraint`] annotation is used to specify a unique constraint to be included by the automated schema generator for the primary or secondary table associated with the current annotated entity.
166
+
The https://javaee.github.io/javaee-spec/javadocs/javax/persistence/UniqueConstraint.html[`@UniqueConstraint`] annotation is used to specify a unique constraint to be included by the automated schema generator for the primary or secondary table associated with the current annotated entity.
167
167
168
168
Considering the following entity mapping, Hibernate generates the unique constraint DDL when creating the database schema:
169
169
@@ -203,7 +203,7 @@ The second INSERT statement fails because of the unique constraint violation.
203
203
[[schema-generation-columns-index]]
204
204
=== Columns index
205
205
206
-
The http://docs.oracle.com/javaee/7/api/javax/persistence/Index.html[`@Index`] annotation is used by the automated schema generation tool to create a database index.
206
+
The https://javaee.github.io/javaee-spec/javadocs/javax/persistence/Index.html[`@Index`] annotation is used by the automated schema generation tool to create a database index.
207
207
208
208
Considering the following entity mapping, Hibernate generates the index when creating the database schema:
0 commit comments