Announcement Announcement Module
Collapse
No announcement yet.
findOne returns no results when using Composite keys Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • findOne returns no results when using Composite keys

    I really liked the Hades project and quickly moved to Data JPA. Initially the Data model was with surrogate keys and data jpa worked absolutely fine. Now the architects decided to change it to Composite keys. When trying to search with the composite primary key it returns no results. The SQL generated does a join on almost all the tables in the Database.

  • #2
    The SQL generated does a join on almost all the tables in the Database

    Comment


    • #3
      If you can post your previous and new methods implementations and how you define the composite PK would be better to get a complete idea

      Comment


      • #4
        There's currently an open issue regarding this topic that deals with the usage of @IdClass. If you're using a class annotated with @Embeddable and refer to this one via @EmbeddedId you should be okay.

        Comment

        Working...
        X