aUoW.removeKeyReference(productsOfDiscussion);
}
}
private void save(Product aProduct, LevelDBUnitOfWork aUoW) {
LevelDBKey primaryKey = new LevelDBKey(PRIMARY, aProduct.tenantId().id(), aProduct.productId().id());
aUoW.write(primaryKey, aProduct);
LevelDBKey productsOfTenant = new LevelDBKey(primaryKey, PRODUCTS_OF_TENANT, aProduct.tenantId().id());
aUoW.updateKeyReference(productsOfTenant);
if (aProduct.discussionInitiationId() != null) {
LevelDBKey productsOfDiscussion = new LevelDBKey(primaryKey, PRODUCT_OF_DISCUSSION, aProduct.tenantId().id(), aProduct.discussionInitiationId());
aUoW.updateKeyReference(productsOfDiscussion);
}
}