key.setTypeName( null ); Ejb3Column.checkPropertyConsistency( joinColumns, collValue.getOwnerEntityName() ); key.setNullable( joinColumns.length == 0 || joinColumns[0].isNullable() );
key.setTypeName( null ); Ejb3Column.checkPropertyConsistency( joinColumns, collValue.getOwnerEntityName() ); key.setNullable( joinColumns.length == 0 || joinColumns[0].isNullable() );
/** * Creates the DependentValue object that forms a primary key reference for the collection. * * @param mappings * @param property The grails property * @param collection The collection object * @param persistentClasses * @return The DependantValue (key) */ private static DependantValue createPrimaryKeyValue(Mappings mappings, @SuppressWarnings("unused") GrailsDomainClassProperty property, Collection collection, @SuppressWarnings("unused") Map<?, ?> persistentClasses) { KeyValue keyValue; DependantValue key; String propertyRef = collection.getReferencedPropertyName(); // this is to support mapping by a property if (propertyRef == null) { keyValue = collection.getOwner().getIdentifier(); } else { keyValue = (KeyValue) collection.getOwner().getProperty(propertyRef).getValue(); } if (LOG.isDebugEnabled()) LOG.debug("[GrailsDomainBinder] creating dependant key value to table [" + keyValue.getTable().getName() + "]"); key = new DependantValue(mappings, collection.getCollectionTable(), keyValue); key.setTypeName(null); // make nullable and non-updateable key.setNullable(true); key.setUpdateable(false); return key; }
/** * Creates the DependentValue object that forms a primary key reference for the collection. * * @param mappings * @param property The grails property * @param collection The collection object * @param persistentClasses * @return The DependantValue (key) */ protected DependantValue createPrimaryKeyValue(Mappings mappings, PersistentProperty property, Collection collection, Map<?, ?> persistentClasses) { KeyValue keyValue; DependantValue key; String propertyRef = collection.getReferencedPropertyName(); // this is to support mapping by a property if (propertyRef == null) { keyValue = collection.getOwner().getIdentifier(); } else { keyValue = (KeyValue) collection.getOwner().getProperty(propertyRef).getValue(); } if (LOG.isDebugEnabled()) LOG.debug("[GrailsDomainBinder] creating dependant key value to table [" + keyValue.getTable().getName() + "]"); key = new DependantValue(mappings, collection.getCollectionTable(), keyValue); key.setTypeName(null); // make nullable and non-updateable key.setNullable(true); key.setUpdateable(false); return key; }
key.setTypeName( null ); Ejb3Column.checkPropertyConsistency( joinColumns, collValue.getOwnerEntityName() ); key.setNullable( joinColumns.length == 0 || joinColumns[0].isNullable() );
dv.setTypeName(null); dv.setNullable(false); set.setKey(dv);
dv.setTypeName(null); dv.setNullable(false); set.setKey(dv);
key.setTypeName( null ); Ejb3Column.checkPropertyConsistency( joinColumns, collValue.getOwnerEntityName() ); key.setNullable( joinColumns.length == 0 || joinColumns[0].isNullable() );
key.setTypeName( null ); Ejb3Column.checkPropertyConsistency( joinColumns, collValue.getOwnerEntityName() ); key.setNullable( joinColumns.length == 0 || joinColumns[0].isNullable() );