How do i add a record to a child entity in the example below ? For example i have a Employee Record which is name is "Sam". how do i add 2 street adress for sam ?
Guess i have a
The Parent entity is Employee
import java.util.List;
// ...
@Persistent(mappedBy = "employee")
private List<ContactInfo> contactInfoSets;
The Child key is Adress
import com.google.appengine.api.datastore.Key;
// ... imports ...
@PersistenceCapable
public class ContactInfo {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private String streetAddress;
// ...
}