datanucleus-rdbms
datanucleus-rdbms copied to clipboard
Support JPA "MapsId"
AbstractMemberMetaData has "getMapsIdAttribute" from annotations/XML. Need to make use of it.
Could be useful if fully supporting '@EmbeddedId', for example
@Entity
public class Employee
{
@Id
long id;
}
@Entity
@IdClass(DependentId.class)
public class Dependent
{
@EmbeddedId
DependentId id;
@MapsId("employeePK")
@ManyToOne
Employee employee;
}
@Embeddable
public class DependentId
{
String name; // matches name of @Id attribute
long employeePk; // matches type of Employee PK
...
}
Note that this is strongly linked to an update to the enhancement contract in https://github.com/datanucleus/datanucleus-core/issues/155