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 @@ -55,7 +55,7 @@ In Gradle, for example, you'll need to use `annotationProcessor`.

[source,groovy]
----
annotationProcessor 'org.hibernate.orm:hibernate-processor:7.0.0'
annotationProcessor 'org.hibernate.orm:hibernate-processor:7.0.0.Final'
----

=== Excluding classes from processing
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/main/asciidoc/repositories/Preface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ On the other hand, the programming model for interacting with the database is qu
Therefore, this document will show you a different way to use Hibernate.

The coverage of Jakarta Data is intentionally inexhaustive.
If exhaustion is sought, this document should be read in conjunction with the specification, which we've worked hard to keep readable.
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.

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

Expand Down
14 changes: 9 additions & 5 deletions documentation/src/main/asciidoc/repositories/Repositories.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class Author {
}
----

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

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

The Jakarta Data specification does not say how this should work, but in Hibernate Data Repositories, the implementation is generated by an annotation processor.
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.
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.

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

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

- <<default-method,`default` methods>>,
Expand Down Expand Up @@ -204,7 +204,7 @@ interface AuthorRepository
}
----

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.
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.

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

A resource accessor method is one which exposes access to an underlying implementation type.
Currently, Hibernate Data Repositories only supports one such type: `StatelessSession`.
Currently, Hibernate Data Repositories supports two such implementation types:

1. `StatelessSession`, for the ordinary sort of repository we're talking about now, and
2. `Mutiny.StatelessSession`, for <<reactive-repositories,reactive repositories>>.

So a resource accessor method is just any abstract method which returns `StatelessSession`.
The name of the method doesn't matter.

Expand Down