Skip to content

Instantly share code, notes, and snippets.

@shin1ogawa
Created May 14, 2009 10:06
Show Gist options
  • Save shin1ogawa/111595 to your computer and use it in GitHub Desktop.
Save shin1ogawa/111595 to your computer and use it in GitHub Desktop.
import java.util.ArrayList;
import java.util.List;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import com.google.appengine.api.datastore.Key;
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Parent1 {
/** 主キー */
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private List<Child1> children = new ArrayList<Child1>(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment