I used seam to generate my entities. But I have a many to many composite table with an employee id and a vehicle id and it generated the hash sets wrong. I want to be able to choose an employee's favorite vehicle in the employee object. However; when I add things to the hashset in the employee object and persist it, it does not add anything to the composite table. The vehicle object has the
@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@JoinTable(name = "flower_store_emp_vehicle", schema = "dbo", catalog = "tyler", joinColumns = { @JoinColumn(name = "vehicle_id", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "employee_id", nullable = false, updatable = false) })
and the employee object has the:
@ManyToMany(fetch = FetchType.LAZY, mappedBy = "flowerStoreEmployees")
I am guessing these are backwards, however; I am new to seam and do not how to switch them around without the mappedBy being all wrong. If anyone knows how to help it would be greatly appreciated. Thank you