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