public static void createUniqueConstraint(Value value) { value.getMappedTable().createUniqueKey( value.getMappedColumns() ); }
@SuppressWarnings({"unchecked"}) private String searchMappedBy(PersistentClass referencedClass, MappedTable collectionTable) { final Iterator<Property> properties = referencedClass.getPropertyIterator(); while ( properties.hasNext() ) { final Property property = properties.next(); if ( property.getValue() instanceof Collection ) { // The equality is intentional. We want to find a collection property with the same collection table. //noinspection ObjectEquality if ( property.getValue().getMappedTable() == collectionTable ) { return property.getName(); } } } return null; }
String dependentTable = sp.getValue().getMappedTable().getQualifiedTableName().render(); if ( dependentTable.compareTo( startTable ) == 0 ) { throw new AnnotationException( "Foreign key circularity dependency involving the following tables: " + startTable + ", " + dependentTable );
public void addProperty(Property prop, XClass declaringClass) { if ( prop.getValue() instanceof Component ) { //TODO handle quote and non quote table comparison String tableName = prop.getValue().getMappedTable().getName(); if ( getJoinsPerRealTableName().containsKey( tableName ) ) { final Join join = getJoinsPerRealTableName().get( tableName ); addPropertyToJoin( prop, declaringClass, join ); } else { addPropertyToPersistentClass( prop, declaringClass ); } } else { addPropertyToPersistentClass( prop, declaringClass ); } }
if ( otherSideProperty.getValue() instanceof Collection ) { table = otherSideProperty.getValue().getMappedTable(); table = otherSideProperty.getValue().getMappedTable();