1 Reply Latest reply on Jan 6, 2009 10:10 AM by Adam Warski

    envers and compound primary keys

    Olaf Meske Newbie

      We have a database design that needs to use partitioning, and for this we need to add the partitioning key to ALL primary keys of all tables. Thats why we have almost all primary keys as compound keys with two fields (the partitioning key and the entity id).

      I try to use the envers project with this compound primary keys for ALL tables (including the @RevisionEntity) and envers fails with an

      org.hibernate.MappingException: Foreign key (FK7535344A74C7597:IssueCustomMetaData_AUD [REV])) must have same number of columns as the referenced primary key (RevisionEntry [id,publicationID])

      during startup.

      My @RevisionEntity class has an @Embeddable class with two fields that is used as @Id (like almost all other entities of my application). So all foreign keys have to use at least three or four columns.

      So is there a plan or roadmap to support compound primary keys or does anyone has an idea how much work is needed to support this feature?