Announcement Announcement Module
No announcement yet.
How to remove composite primary key Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to remove composite primary key

    The docs say that

    "If you decide that your table does not require a composite primary key anymore, the next time you execute the database reverse engineer command, Roo will automatically change the entity to use a single primary key and remove the identifier class if it is permitted."

    But I don't see how to do this. My table does have a primary key, but Hibernate is generating queries with bad syntax for Oracle, like trying to make a count() query with multiple columns. I think everything would be just fine if the model of the table didn't user the composite primary key-

  • #2
    I'm facing same issue. Will appreciate and help. After all these years we still don't have the solution for problem.


    • #3
      I ended up removing composite primary keys from my tables, and replacing them with other kinds of constraints ( check constraints etc.) didn't take that long and certainly saves me from a lot of headaches-