collectionMapping.setShouldExtendPessimisticLockScope(true);
// Set the cascade on delete if specified.
collectionMapping.setIsCascadeOnDeleteSetOnDatabase(isCascadeOnDelete());
} else if (mapping instanceof AggregateMapping) {
AggregateMapping aggregateMapping = (AggregateMapping)mapping;
// Set the reference class name.
aggregateMapping.setReferenceClassName(getReferenceClassName());
}
// Set the non cacheable if specified.
mapping.setIsCacheable(!isNonCacheable());