I have an entity where I cant have access to modify a wrong unique=true
into the column definition
@Embeddable
class SomePk{
@Column(name="PERSON_ID", unique=true, nullable=false, precision=15)
public long getPersonId() {
return this.personId;
}
}
Using DB-Rider/DBUnit with Hibernate and Spring into JUnitTests the tables and constraints are auto-created before inserts are done according to DB-rider principles.
Am looking for a way of either avoid this constraint creation. Having something like com.my.package.SomePk.PERSON_ID:forceUnique=false
Looked into insert listeners, as well as hibernate reverse engineering config but didnt find a way yet…