void createPrimaryKey() { if ( !isOneToMany() ) { PrimaryKey pk = new PrimaryKey( getCollectionTable() ); pk.addColumns( getIdentifier().getColumnIterator() ); getCollectionTable().setPrimaryKey(pk); } // create an index on the key columns?? }
final SimpleValue idBinding = new SimpleValue( mappingDocument, idBagBinding.getCollectionTable() );
public static void bindIdentifierCollectionSecondPass(Element node, IdentifierCollection collection, java.util.Map persistentClasses, Mappings mappings, java.util.Map inheritedMetas) throws MappingException { bindCollectionSecondPass( node, collection, persistentClasses, mappings, inheritedMetas ); Element subnode = node.element( "collection-id" ); SimpleValue id = new SimpleValue( collection.getCollectionTable() ); bindSimpleValue( subnode, id, false, IdentifierCollection.DEFAULT_IDENTIFIER_COLUMN_NAME, mappings ); collection.setIdentifier( id ); makeIdentifier( subnode, id, mappings ); }
SimpleValue iv = new SimpleValue( list.getCollectionTable() ); bindSimpleValue( subnode,
public static void bindIdentifierCollectionSecondPass(Element node, IdentifierCollection collection, java.util.Map persistentClasses, Mappings mappings, java.util.Map inheritedMetas) throws MappingException { bindCollectionSecondPass( node, collection, persistentClasses, mappings, inheritedMetas ); Element subnode = node.element( "collection-id" ); SimpleValue id = new SimpleValue( mappings, collection.getCollectionTable() ); bindSimpleValue( subnode, id, false, IdentifierCollection.DEFAULT_IDENTIFIER_COLUMN_NAME, mappings ); collection.setIdentifier( id ); makeIdentifier( subnode, id, mappings ); }
public static void bindIdentifierCollectionSecondPass(Element node, IdentifierCollection collection, java.util.Map persistentClasses, Mappings mappings, java.util.Map inheritedMetas) throws MappingException { bindCollectionSecondPass( node, collection, persistentClasses, mappings, inheritedMetas ); Element subnode = node.element( "collection-id" ); SimpleValue id = new SimpleValue( mappings, collection.getCollectionTable() ); bindSimpleValue( subnode, id, false, IdentifierCollection.DEFAULT_IDENTIFIER_COLUMN_NAME, mappings ); collection.setIdentifier( id ); makeIdentifier( subnode, id, mappings ); }
void createPrimaryKey() { if ( !isOneToMany() ) { PrimaryKey pk = new PrimaryKey(); pk.addColumns( getIdentifier().getColumnIterator() ); getCollectionTable().setPrimaryKey(pk); } else { // don't create a unique key, 'cos some // databases don't like a UK on nullable // columns //getCollectionTable().createUniqueKey( getIdentifier().getConstraintColumns() ); } // create an index on the key columns?? }
void createPrimaryKey() { if ( !isOneToMany() ) { PrimaryKey pk = new PrimaryKey(); pk.addColumns( getIdentifier().getColumnIterator() ); getCollectionTable().setPrimaryKey(pk); } else { // don't create a unique key, 'cos some // databases don't like a UK on nullable // columns //getCollectionTable().createUniqueKey( getIdentifier().getConstraintColumns() ); } // create an index on the key columns?? }
void createPrimaryKey() { if ( !isOneToMany() ) { PrimaryKey pk = new PrimaryKey(); pk.addColumns( getIdentifier().getColumnIterator() ); getCollectionTable().setPrimaryKey(pk); } else { // don't create a unique key, 'cos some // databases don't like a UK on nullable // columns //getCollectionTable().createUniqueKey( getIdentifier().getConstraintColumns() ); } // create an index on the key columns?? }
void createPrimaryKey() { if ( !isOneToMany() ) { PrimaryKey pk = new PrimaryKey(); pk.addColumns( getIdentifier().getColumnIterator() ); getCollectionTable().setPrimaryKey(pk); } else { // don't create a unique key, 'cos some // databases don't like a UK on nullable // columns //getCollectionTable().createUniqueKey( getIdentifier().getConstraintColumns() ); } // create an index on the key columns?? }