спасибо большое, у меня все получилось.
Я сосредоточился на @JoinTable, неправильном направлении.
@secondaryTable сделали свое дело.
вот решение:
@Entity
@Table(name = "COTISATION")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@SecondaryTable(name = "COTISATION_SYNCHRO", pkJoinColumns = @PrimaryKeyJoinColumn(name = "COTISATION_SYNCHRO_COTISATION_ID_FK"))
public class Cotisation {
...
@Embedded
@AttributeOverrides({
@AttributeOverride(name = "lastAccessLocal", column = @Column(name = "LAST_ACCESS_LOCAL", table = "COTISATION_SYNCHRO")),
@AttributeOverride(name = "lastUpdateLocal", column = @Column(name = "LAST_UPDATE_LOCAL", table = "COTISATION_SYNCHRO")),
@AttributeOverride(name = "lastAccessRemote", column = @Column(name = "LAST_ACCESS_REMOTE", table = "COTISATION_SYNCHRO")),
@AttributeOverride(name = "lastUpdateRemote", column = @Column(name = "LAST_UPDATE_REMOTE", table = "COTISATION_SYNCHRO"))
})
private SynchroData synchroData;
@Column(name = "COTISATION_COUPON", table = "COTISATION_SYNCHRO", unique = true)
private Long cotisationCoupon;
с классом SynchroData с аннотацией @ Embeddable