suppose we have a class called LatLng
:
public class LatLng {
private long id;
private double latitude;
private double longitude;
//setters & getters
}
as you can see in the picture below:
we have a one-to-one relationship between PoliceStation
and LatLng
and one-to-one relationship between Hotel
and LatLng
and so on...
how can we create such a relationship in hibernate? (both annotation and xml-mapping)