Joined: Tue Nov 27, 2007 12:08 pm Posts: 1
|
Is there a way to make an embedded field nullable if the fields of the embeddable object are not nullable?
I have an embeddable object Coordinates which has non-nullable properties latitude and longitude. When referencing Coordinates in the Location class, that reference can be null. Is there a way to clarify this distinction using annotations?
@Embeddable class Coordinates {
private double latitude;
private double longitude;
...
}
@Entity class Location {
@Embedded private Coordinates coordinates; // How can this be made nullable?
...
}
|
|