Skip to content

Update documentation. #3174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Update documentation. #3174

wants to merge 3 commits into from

Conversation

christophstrobl
Copy link
Member

@christophstrobl christophstrobl commented Oct 9, 2024

Add section on reserved method names within repository interfaces.

Related to: #3173

Add section on reserved method names within repository interfaces.
@@ -37,6 +37,11 @@ public interface CrudRepository<T, ID> extends Repository<T, ID> {
The methods declared in this interface are commonly referred to as CRUD methods.
`ListCrudRepository` offers equivalent methods, but they return `List` where the `CrudRepository` methods return an `Iterable`.

[IMPORTANT]
====
The repository interface implies a few reserved methods like `findById(ID identifier)` that always target the domain types identifier property regardless of its property name. Read more about this in "`xref:repositories/query-methods-details.adoc#repositories.query-methods.reserved-methods[Defining Query Methods]`".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to watch for broken references in case a Data module doesn't ship a repositories/query-methods-details.adoc documentation page.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there one you're aware of right off the top of your head?

Add DDD context. Explain identifier to domain object relationship. Tweak wording.
@mp911de mp911de requested a review from odrotbohm October 10, 2024 12:15
[TIP]
====
Spring Data considers domain types to be entities, more specifically aggregates.
So you will see the term "entity" used throughout the documentation that can be interchanged with the term "domain type" or "aggregate".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@odrotbohm any opinion on wording? We want to make the point that identifiers need sometimes a different handling than properties, yet in both cases we need to express access to these via some name.

mp911de pushed a commit that referenced this pull request Oct 17, 2024
Add section on reserved method names within repository interfaces.

Closes #3173
Original pull request: #3174
mp911de added a commit that referenced this pull request Oct 17, 2024
Add DDD context. Explain identifier to domain object relationship. Tweak wording.

See #3173
Original pull request: #3174
mp911de pushed a commit that referenced this pull request Oct 17, 2024
Add section on reserved method names within repository interfaces.

Closes #3173
Original pull request: #3174
mp911de added a commit that referenced this pull request Oct 17, 2024
Add DDD context. Explain identifier to domain object relationship. Tweak wording.

See #3173
Original pull request: #3174
mp911de pushed a commit that referenced this pull request Oct 17, 2024
Add section on reserved method names within repository interfaces.

Closes #3173
Original pull request: #3174
mp911de added a commit that referenced this pull request Oct 17, 2024
Add DDD context. Explain identifier to domain object relationship. Tweak wording.

See #3173
Original pull request: #3174
@mp911de mp911de added the type: documentation A documentation update label Oct 17, 2024
@mp911de mp911de linked an issue Oct 17, 2024 that may be closed by this pull request
@mp911de mp911de closed this Oct 17, 2024
@mp911de mp911de deleted the issue/3173 branch October 17, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect implementation of "ID" in SQL queries
2 participants