final DatabaseConnector connection) {
final ObjectAdapter parent = collectionAdapter.getAggregateRoot();
LOG.debug("change to internal collection being persisted through parent");
final Oid oid = collectionAdapter.getOid();
final CollectionOid collectionOid = (CollectionOid) oid;
if (!(oid instanceof CollectionOid)) {
throw new IsisAssertException("object should have a CollectionOid");
}
final ObjectMapping mapping = objectMappingLookup.getMapping(parent, connection);
if (!mapping.saveCollection(connection, parent, collectionOid.getName())) {
final ObjectMapping parentMapping = objectMappingLookup.getMapping(parent, connection);
parentMapping.save(connection, collectionAdapter);
}
}