So, I'm using google datastore for my GWT app and my coworker came up with an interesting question that I don't have the answer to. What happens to the set of keys when you delete some of the objects?
For example,
Person.java
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Person {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
@Persistent
private Set<Key> favoriteFoods;
// ...
}
What happens if I delete some of the favoriteFood objects from the datastore? Does the key to that object stay in the set of keys? Is it my responsibility to remove the key from the set?