Skip to content

Demonstrating use of composite ids. #696

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 1 commit into from
Closed

Demonstrating use of composite ids. #696

wants to merge 1 commit into from

Conversation

schauder
Copy link
Contributor

This goes with the blog article about composite ids.

@schauder schauder requested a review from mp911de July 18, 2025 08:29
* @see InsertRepository
* @see InsertRepositoryImpl
*/
interface EmployeeRepository extends ListCrudRepository<Employee, EmployeeId>, InsertRepository<Employee> {
Copy link
Member

Choose a reason for hiding this comment

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

Using fewer dependencies (i.e. just Repository) would be a welcome simplification as that is what we advocate for.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

* @author Jens Schauder
*/
class InsertRepositoryImpl<E> implements InsertRepository<E> {
@Autowired
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Please use constructor injection.

Copy link
Member

@mp911de mp911de left a comment

Choose a reason for hiding this comment

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

Feel free to merge this one and the blog once going over the comments.

schauder added a commit that referenced this pull request Jul 21, 2025
Doing this as part of the relational composite id example, since we depend on that mile sone as well.

Original pull request #696
schauder added a commit that referenced this pull request Jul 21, 2025
@schauder
Copy link
Contributor Author

Did all the changes as merged it.

This includes the upgrade for the AOT examples.

@schauder schauder closed this Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants