JPA-43 - Impl Index and ForeignKey for JPA 2.1
This commit is contained in:
parent
51a7df596e
commit
0e6d08d414
|
@ -144,9 +144,9 @@ public class IndexTest extends BaseCoreFunctionalTestCase {
|
||||||
Bag set = (Bag)property.getValue();
|
Bag set = (Bag)property.getValue();
|
||||||
Table collectionTable = set.getCollectionTable();
|
Table collectionTable = set.getCollectionTable();
|
||||||
|
|
||||||
Iterator<UniqueKey> itr = collectionTable.getUniqueKeyIterator();
|
Iterator<Index> itr = collectionTable.getIndexIterator();
|
||||||
assertTrue( itr.hasNext() );
|
assertTrue( itr.hasNext() );
|
||||||
UniqueKey index = itr.next();
|
Index index = itr.next();
|
||||||
assertFalse( itr.hasNext() );
|
assertFalse( itr.hasNext() );
|
||||||
assertTrue( "index name is not generated", StringHelper.isNotEmpty( index.getName() ) );
|
assertTrue( "index name is not generated", StringHelper.isNotEmpty( index.getName() ) );
|
||||||
assertEquals( 1, index.getColumnSpan() );
|
assertEquals( 1, index.getColumnSpan() );
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class Alias implements Identifiable {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManyToMany( cascade = CascadeType.ALL )
|
@ManyToMany( cascade = CascadeType.ALL )
|
||||||
@JoinTable( name = "CHARACTER_ALIAS", indexes = @Index( columnList = "characters_id", unique = true))
|
@JoinTable( name = "CHARACTER_ALIAS", indexes = @Index( columnList = "characters_id"))
|
||||||
// @JoinTable(
|
// @JoinTable(
|
||||||
// name = "CHARACTER_ALIAS",
|
// name = "CHARACTER_ALIAS",
|
||||||
// joinColumns = @JoinColumn(name="ALIAS_ID", referencedColumnName="ID"),
|
// joinColumns = @JoinColumn(name="ALIAS_ID", referencedColumnName="ID"),
|
||||||
|
|
Loading…
Reference in New Issue