Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support JPA "MapsId" #17

Open
andyjefferson opened this issue Apr 11, 2016 · 1 comment
Open

Support JPA "MapsId" #17

andyjefferson opened this issue Apr 11, 2016 · 1 comment

Comments

@andyjefferson
Copy link
Member

andyjefferson commented Apr 11, 2016

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
    ...
}
@andyjefferson andyjefferson added this to the 5.1.0.m1 milestone Nov 20, 2016
@andyjefferson andyjefferson modified the milestones: 5.1.0.m1, 5.1.0.release Mar 1, 2017
@andyjefferson
Copy link
Member Author

Note that this is strongly linked to an update to the enhancement contract in datanucleus/datanucleus-core#155

@andyjefferson andyjefferson removed this from the 5.1.0.m5 milestone Jul 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant