Hi,
While modelling unowned many-to-many relationship as mentioned in
http://code.google.com/appengine/docs/java/datastore/relationships.html
adding or removing a relationship requires loading of all keys of the
other object.
public void addFavoriteFood(Food food) {
favoriteFoods.add(food.getKey());
food.getFoodFans().add(getKey()); ///loads all the foodFans in the
Food object
}
public void removeFavoriteFood(Food food) {
favoriteFoods.remove(food.getKey());
food.getFoodFans().remove(getKey()); ///loads all the foodFans in
the Food object
}
Is there a way to avoid this?
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.