Skip to content

Commit 109a4ed

Browse files
committed
some updates to the Repositories guide
1 parent 5405374 commit 109a4ed

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

documentation/src/main/asciidoc/repositories/Configuration.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ In Gradle, for example, you'll need to use `annotationProcessor`.
5555

5656
[source,groovy]
5757
----
58-
annotationProcessor 'org.hibernate.orm:hibernate-processor:7.0.0'
58+
annotationProcessor 'org.hibernate.orm:hibernate-processor:7.0.0.Final'
5959
----
6060

6161
=== Excluding classes from processing

documentation/src/main/asciidoc/repositories/Preface.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ On the other hand, the programming model for interacting with the database is qu
1616
Therefore, this document will show you a different way to use Hibernate.
1717

1818
The coverage of Jakarta Data is intentionally inexhaustive.
19-
If exhaustion is sought, this document should be read in conjunction with the specification, which we've worked hard to keep readable.
19+
If exhaustion is sought, this document should be read in conjunction with https://jakarta.ee/specifications/data/1.0/jakarta-data-1.0[the specification], which we've worked hard to keep readable.
2020

2121
If you are unfamiliar with Hibernate, this document should be read in conjunction with:
2222

documentation/src/main/asciidoc/repositories/Repositories.adoc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class Author {
4949
}
5050
----
5151

52-
For more information about mapping entities, see the link:{doc-introduction-url}#entities[Introduction to Hibernate 6].
52+
For more information about mapping entities, see the link:{doc-introduction-url}#entities[Short Guide to Hibernate 7].
5353

5454
[NOTE]
5555
====
@@ -138,7 +138,7 @@ A _repository interface_ is an interface written by you, the application program
138138
The implementation of the repository interface is provided by a Jakarta Data provider, in our case, by Hibernate Data Repositories.
139139

140140
The Jakarta Data specification does not say how this should work, but in Hibernate Data Repositories, the implementation is generated by an annotation processor.
141-
In fact, you might already be using this annotation processor: it's just `HibernateProcessor` from the module which used to be called `hibernate-jpamodelgen`, and has now been renamed `hibernate-processor` in Hibernate 7.
141+
In fact, you might already be using https://hibernate.org/orm/processor/[this annotation processor]: it's just `HibernateProcessor` from the module which used to be called `hibernate-jpamodelgen`, and has now been renamed `hibernate-processor` in Hibernate 7.
142142

143143
[TIP]
144144
====
@@ -147,7 +147,7 @@ If you're already using the JPA static metamodel in your project, you already ha
147147
If you don't, we'll see how to set it up in the <<configuration-integration,next chapter>>.
148148
====
149149

150-
Of course, a Jakarta Data provider can't generate an implementation of any arbitrary method.
150+
Unlike a language model, a Jakarta Data provider can't generate an implementation of any arbitrary method based only on vibes.
151151
Therefore, the methods of a repository interface must fall into one of the following categories:
152152

153153
- <<default-method,`default` methods>>,
@@ -204,7 +204,7 @@ interface AuthorRepository
204204
}
205205
----
206206

207-
We won't see `BasicRepository` and `CrudRepository` again in this document, because they're not necessary, and because they implement the older, less-flexible way of doing things.
207+
We won't see `BasicRepository` and `CrudRepository` again in this document, because they're not necessary, and because they implement the older, completely uncool way of doing things.
208208

209209
Instead, our repositories will often group together operations dealing with several related entities, even when the entities don't have a single "root".
210210
This situation is _extremely_ common in relational data models.
@@ -259,7 +259,11 @@ For that, we'll need to add a resource accessor method.
259259
=== Resource accessor methods
260260

261261
A resource accessor method is one which exposes access to an underlying implementation type.
262-
Currently, Hibernate Data Repositories only supports one such type: `StatelessSession`.
262+
Currently, Hibernate Data Repositories supports two such implementation types:
263+
264+
1. `StatelessSession`, for the ordinary sort of repository we're talking about now, and
265+
2. `Mutiny.StatelessSession`, for <<reactive-repositories,reactive repositories>>.
266+
263267
So a resource accessor method is just any abstract method which returns `StatelessSession`.
264268
The name of the method doesn't matter.
265269

0 commit comments

Comments
 (0)