this.getCollection( key.getEntityKey() ).update( entity, updater, true, false, writeConcern );
//adding assoc after update because the query takes the whole object today
addEmptyAssociationField( key, entity );
}
}
return new Association( new MongoDBAssociationSnapshot( entity, key, storageStrategy ) );
}
DBCollection associations = getAssociationCollection( key, storageStrategy );
DBObject assoc = associationKeyToObject( key, storageStrategy );
assoc.put( ROWS_FIELDNAME, Collections.EMPTY_LIST );
associations.insert( assoc, writeConcern );
return new Association( new MongoDBAssociationSnapshot( assoc, key, storageStrategy ) );
}