table : map__company__branches (company_id int, branch_id int, is_primary_branch tinyint(1))
public class company
{
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "map__company__branches", joinColumns = { @JoinColumn(name = "company_id") })
@MapKeyManyToMany(joinColumns = { @JoinColumn(name = "branch_id") })
@column(name="is_primary_branch")
Map<Branch, Boolean> branchMap;
}
Since Boolean type is not mapped entity so its giving error "targeting an unmapped class".