When you make a connection table with hibernation annotation, how to add an extra column that is not a join column, for example, as married as a weak object? how is the extra column?
@ManyToMany(targetEntity=some.class, cascade ={CascadeType.PERSIST, CascadeType.MERGE}, fetch=FetchType.EAGER) @JoinTable(name = "RELATION", joinColumns ={ @JoinColumn(name = "HID", unique = true) }, inverseJoinColumns = { @JoinColumn(name = "FID") }) Set<PERSON> PEOPLE = new HashSet<PERSON>();
source share