[appengine-java] Re: JPA - Problem when I will insert a parent with a child already inserted.

2010-11-22 Thread jpt
vaninh0, you can only create owned relationships in the datastore if the child's key is of type com.google.appengine.api.datastore.Key or String ("Key as Encoded String"). Check this part of the documentation: http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.ht

[appengine-java] Re: JPA - Problem when I will insert a parent with a child already inserted.

2010-11-18 Thread vaninh0
Ops, I posted with one mistake... correcting: @Entity(name = "Usuario") @Table(name = "usuario") public class Usuario { @Id @Column(name = "id_usuario") @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @ManyToOne(fetch = FetchType