The new metamodel take care of table constraints via Binder#bindUniqueConstraints. This only includes constraints in the primary or secondary table of an entity. Join tables can, however, also define unique constraints via eg @CollectionTable or @JoinTable.
On a source level unique constraints are currently retrieved from EntitySource#getConstraints. Should getConstraints not really be part of TableSpecificationSource?
|