mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 08:35:13 +00:00
JPA-43 - Impl Index and ForeignKey for JPA 2.1
This commit is contained in:
parent
51a7df596e
commit
0e6d08d414
@ -144,9 +144,9 @@ public void testJoinTableIndex(){
|
||||
Bag set = (Bag)property.getValue();
|
||||
Table collectionTable = set.getCollectionTable();
|
||||
|
||||
Iterator<UniqueKey> itr = collectionTable.getUniqueKeyIterator();
|
||||
Iterator<Index> itr = collectionTable.getIndexIterator();
|
||||
assertTrue( itr.hasNext() );
|
||||
UniqueKey index = itr.next();
|
||||
Index index = itr.next();
|
||||
assertFalse( itr.hasNext() );
|
||||
assertTrue( "index name is not generated", StringHelper.isNotEmpty( index.getName() ) );
|
||||
assertEquals( 1, index.getColumnSpan() );
|
||||
|
@ -69,7 +69,7 @@ public void setAlias(String alias) {
|
||||
}
|
||||
|
||||
@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(
|
||||
// name = "CHARACTER_ALIAS",
|
||||
// joinColumns = @JoinColumn(name="ALIAS_ID", referencedColumnName="ID"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user