HI, I have the following model:
@Entity
class Flight{
private Airport airportFrom;
private Airport airportTo;
@OneToOne(fetch=FetchType.LAZY,optional=false)
public Airport getAirportFrom(){
return this.airportFrom;
}
@OneToOne(fetch=FetchType.LAZY,optional=false)
public Airport getAirportTo(){
return this.airportTo;
}
}
@Entity
class Airport{
private Integer airportId;
@Id
public Integer getAirportId(){
this.airportId;
}
}
And I'm getting this error:
org.hibernate.MappingException: Repeated column in mapping for entity: model.entities.Flight column: airportId (should be mapped with insert="false" update="false")