So I can't figure out why this doesn't work:
Class that controls the one-to-one relationship:
private String zipCode;
private ZipCodeMetadata zipCodeMetadata;
@OneToOne
@JoinColumn(name="zipCode", insertable=false, updatable=false)
public ZipCodeMetadata getZipCodeMetadata() {...}
Basically when this object is created, I wanted to just have the user input a zipCode and the metadata would be managed from that point forward via the one-to-one relationship. Is this reasonable, or is there a better way to do it?
|