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

EmbeddedId #195

Closed
mdf123 opened this Issue Sep 3, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@mdf123

mdf123 commented Sep 3, 2015

The entities in my project all have @EmbeddedId (compount primary key) no @id.
When I try to use javers on them I get Class '<>' mapped as Entity has no Id property.
Is it somehow possible to to use javers with @EmbeddedId? If yes, how?

@bartoszwalacik

This comment has been minimized.

Member

bartoszwalacik commented Sep 3, 2015

What is a type of these id objects. Is it some kind of value objects like

Person {
  String name;
  Sting login;
}

?

@mdf123

This comment has been minimized.

mdf123 commented Sep 4, 2015

Hello,

it is this class

@Embeddable
public class EntityPK implements Serializable {

@Column(columnDefinition = "NUMBER(14)")
private Long id;
@Column(columnDefinition = "NUMBER(4)")
private Integer dienststellenNr;

Used like this

@EmbeddedId
private EntityPK id;

Regards,

Hans M. Rupp

-----Ursprüngliche Mitteilung-----
Von: Bartosz Walacik notifications@github.com
An: javers/javers javers@noreply.github.com
Cc: mdf123 hansrupp@aol.com
Verschickt: Do, 3 Sept 2015 7:06 pm
Betreff: Re: [javers] EmbeddedId (#195)

What is a type of these id objects. Is it some kind of value objects like

Person {
String name;
Sting login;
}

?


Reply to this email directly or view it on GitHub.

@bartoszwalacik

This comment has been minimized.

Member

bartoszwalacik commented Sep 4, 2015

Makes sense, i will add support for EmbeddedId

@bartoszwalacik bartoszwalacik self-assigned this Sep 6, 2015

@bartoszwalacik

This comment has been minimized.

Member

bartoszwalacik commented Sep 16, 2015

fixed in release 1.3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment