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

EmbeddedId #195

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

EmbeddedId #195

mdf123 opened this issue Sep 3, 2015 · 4 comments
Assignees

Comments

@mdf123
Copy link

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
Copy link
Member

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

Person {
  String name;
  Sting login;
}

?

@mdf123
Copy link
Author

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
Copy link
Member

Makes sense, i will add support for EmbeddedId

@bartoszwalacik
Copy link
Member

fixed in release 1.3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants