For JPA hashMap @key as Entity and @Value as Entity. Then how we can add @MapKeyJoinColumn in primary key
@JsonIgnore
@ManyToMany(fetch = FetchType.EAGER,cascade = CascadeType.ALL)
@MapKeyJoinColumn(name="acuuid",referencedColumnName="uuid")
@JoinTable(name="pricerule_brand_account",
joinColumns= {`enter code here`
@JoinColumn(name="brand_id", referencedColumnName = "uuid")
},
inverseJoinColumns= {
@JoinColumn(name="pricerule_id", referencedColumnName = "uuid")
})
@Access(AccessType.FIELD)
private Map<_Account, _PricingRule> accountPricerule = new HashMap<>();**
Here is my code then. It will create one join table that have composite key of brand_id and pricerule_id as a primery key. I also want to add account_id in primary key is it possible? If yes then how I can do it?