-
Jul 20th, 2012, 08:53 AM
#1
Understanding Spring Data JPA repositories common to all entities
Hello,
I am in reference to the following Spring documentation: http://static.springsource.org/sprin...l-repositories
I am trying to understand the logic behind Jpa custom repositories as described above.
My guess is that I have to create a UserRepository interface (in my case User is the specific entity) extending the MyRepository interface and then supply an implementation for it with the proper parameter types. I then have one repository per entity each sharing a number of common methods defined in the MyRepository interface.
This raises a few questions:
One: What if I am performing operations across several entities: which repository do I use?
Two: Does Spring Data Jpa allow for repositories without any type parameters?
Regards,
J.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules