openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Riccardo <>
Subject Issue With Mapping of Derived Identities (JSR 317 section 2.4.1)
Date Wed, 06 Mar 2013 14:36:40 GMT

I am using a mapping of derived identities, as specified in the JSR 317
section 2.4.1. My (simplified) Entities look like the following code:

public class User implements Serializable {
   private Long id;
   private String name;

   private String avatar;
   private String profile;
   @OneToOne(mappedBy = "owner")
   private Inventory inventory;


public class Inventory implements Serializable {
   @OneToOne(fetch = FetchType.EAGER)
   @JoinColumn(name = "Owner", referencedColumnName = "Id")
   private User owner;
   private int slots;
   private Visibility visibility;

If I search an inventory by its primary key via

    this.manager.find(Inventory.class, someId);

the properties of the owner (User object) are all NULL except the id, and an
additional SELECT is executed if I try to access the properties through the
getter-methods. For me this seems not to be normal and any feedback to this
problem would be welcome.



View this message in context:
Sent from the OpenJPA Developers mailing list archive at

View raw message