These are chat archives for hibernate/hibernate-orm

Jan 2018
Wouter Lievens
Jan 15 13:41
I have an entity annotated as such:
@Table(name = "\"forum\"", uniqueConstraints = { @UniqueConstraint(columnNames = { "topic_type", "topic_id" })})
when I run my application I get the following error:
Unable to create unique key constraint (topic_type, topic_id) on table forum: database column 'topic_id', 'topic_type' not found.
This is despite the columns clearly existing, and the code working fine apart from the constraint
the Java field names are topicId and topicType but I though constraints require the physical, not logical, column names?