Hello everyone,
I am having trouble setting up an simple JPA mapping.
I have a first class defined like this :
The second one where A is a member of B
and the key made for B:
With this setup, I want to store A.id as a foreign key of B which is composed of A.id and date as primary key.
I am currently unable to do so, I have tried multiple setup with no luck.
When I persist B for the first time, it stores it correctly but put bpId = 0 in the database. And of course, the second time I persist a B instance it doesn't want because of duplicate primary key.
How can I achieve that ?
Thanks
[Edit] It seems I have posted this
thread in the wrong forum, sorry about that and if a moderator can correct that i'd be happy.