HHH-7843 : Add support for one-to-one to new metamodel

This commit is contained in:
Gail Badner 2013-03-29 02:29:37 -07:00
parent 7e1b94185d
commit e75b81a22e
2 changed files with 3 additions and 6 deletions

View File

@ -2101,12 +2101,8 @@ public class Binder {
)
);
if ( elementSource.isUnique() ) {
<<<<<<< HEAD
UniqueKey uk = collectionTable.getOrCreateUniqueKey( StringHelper.randomFixedLengthHex(
UniqueKey.GENERATED_NAME_PREFIX ) );
=======
// TODO: this should create a unique constrraint instead of marking each individual column unique.
>>>>>>> HHH-7843 : Add support for one-to-one to new metamodel
for ( RelationalValueBinding relationalValueBinding : elementBinding.getRelationalValueBindings() ) {
if ( ! relationalValueBinding.isDerived() ) {
uk.addColumn( (Column) relationalValueBinding.getValue() );

View File

@ -25,6 +25,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.util.Iterator;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@ -75,7 +77,6 @@ public class ConstraintTest extends BaseCoreFunctionalTestCase {
@Test
@TestForIssue( jiraKey = "HHH-1904" )
@FailureExpectedWithNewMetamodel
public void testConstraintNameLength() {
TableSpecification table = SchemaUtil.getTable( DataPoint2.class, metadata() );