Change ManyToMany to OneToMany
This commit is contained in:
@@ -22,7 +22,7 @@ public class Driver extends PlatformUser implements IDriver {
|
|||||||
@ManyToOne(targetEntity = Vehicle.class, optional = false)
|
@ManyToOne(targetEntity = Vehicle.class, optional = false)
|
||||||
private IVehicle vehicle;
|
private IVehicle vehicle;
|
||||||
|
|
||||||
@ManyToMany(targetEntity = Employment.class)
|
@OneToMany(targetEntity = Employment.class)
|
||||||
private Collection<IEmployment> employments = new ArrayList<>();
|
private Collection<IEmployment> employments = new ArrayList<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class Organization implements IOrganization {
|
|||||||
inverseJoinColumns = @JoinColumn(name = I_VEHICLES))
|
inverseJoinColumns = @JoinColumn(name = I_VEHICLES))
|
||||||
private Collection<IVehicle> vehicles = new ArrayList<>();
|
private Collection<IVehicle> vehicles = new ArrayList<>();
|
||||||
|
|
||||||
@ManyToMany(targetEntity = Employment.class)
|
@OneToMany(targetEntity = Employment.class)
|
||||||
private Collection<IEmployment> employments = new ArrayList<>();
|
private Collection<IEmployment> employments = new ArrayList<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user