@Entity(name = "invoice")
public class Invoice extends GenericEntity {
...
@ManyToMany
@JoinTable(name = "invoice_bookings",
joinColumns = {@JoinColumn(name = "invoice_id", foreignKey = @ForeignKey(name = "fk_invoice_bookings_invoice_id")) },
inverseJoinColumns = {@JoinColumn(name = "booking_id", foreignKey = @ForeignKey(name = "fk_invoice_bookings_booking_id")) }
)
private Collection<PackagePlanBooking> bookings;
...
}