Hibernate ORM UniqueKey - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM UniqueKey class.

This code example shows how to use the following methods: getColumn, getColumnSpan
	public void testUniqueKey() { 
		 
		Table table = getTable(identifier("withIndex") );
		 
		UniqueKey uniqueKey = table.getUniqueKey(identifier("otherIdx") );
		assertNotNull(uniqueKey);
		 
		assertEquals(1, uniqueKey.getColumnSpan() );
		 
		Column keyCol = uniqueKey.getColumn(0);
		assertTrue(keyCol.isUnique() );
		 
		assertSame(keyCol, table.getColumn(keyCol) );
		 
	} 
	 
	public void testWithIndex() { 
		 
		Table table = getTable(identifier("withIndex") );
		 
Full Snippet Info
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Hibernate ORM UniqueKey Methods: