mmm i never used that before, why you dont consider this: In your inventory table just create a primary key (numeric) and then add the reference of your User in this table (you can use a unique constraint if you dont want duplicates users).
2013/3/6 Riccardo <riccardo.nim...@s2000.tu-chemnitz.de> > With JPQL and the Criteria-API I get the exact same result. > > Other Entities work for me too, but in this case I use a mapping of derived > identities as specified in JSR 317 section 2.4.1. So, the primary key for > my > inventories is another entity (User). > > @Entity > public class Inventory implements Serializable { > @Id > @OneToOne(fetch = FetchType.EAGER) > @JoinColumn(name = "Owner", referencedColumnName = "Id") > private User owner; > > ... > } > > > > -- > View this message in context: > http://openjpa.208410.n2.nabble.com/Problem-with-Criteria-API-and-fetch-properties-of-related-entities-are-NULL-tp7582995p7583035.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. > -- ------------------------------------------------------------------- *SCJA. José Luis Cetina* -------------------------------------------------------------------