Results 1 to 2 of 2

Thread: Spring Data JPA - Generic Repository parametrized by MappedSuperclass

  1. #1
    Join Date
    Oct 2011
    Posts
    1

    Default Spring Data JPA - Generic Repository parametrized by MappedSuperclass

    I have some entities that inherit a MappedSuperclass.
    I try to create a generic repository parametrized by my MappedSuperclass but I don't find any solution.
    I wonder if it's possible to do it, or it’s absolutely necessary to use Entities?

    thank you for answering.

  2. #2
    Join Date
    Feb 2011
    Posts
    19

    Default

    I've just hit a similar issue, and wondering if there's an answer to this?

    Is there a way to use:

    public interface SomeAbstractRepository extends JpaRepository<SomeAbstractClass,Long>

    given

    @MappedSuperclass
    public class SomeAbstractClass {}

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
  •