Well now you are asking 2 different questions I think:
1) Is this a conceptually valid mapping? Which is what you explicitly
asked originally. I said that imo the mapping itself is conceptually valid.
2) Do we support this? Clearly not.
More in line...
On Thu, Mar 8, 2018, 4:38 PM Gail
Hi Steve,
I know that a bidirectional one-to-one association works properly with
Product#productInfo on the "mappedBy" side, and ProductInfo#product on the
owning side. With that mapping, ProductInfo#product is a ManyToOne that is
a "logical" OneToOne.
I agree that is the more natural way to map
For sure our model can handle this mapping, although maybe only from the
other side (that's generally the more natural mapping) - internally it's
called a "logical many-to-one". Personally I'd say there is nothing wrong
with the mapping per-se.
On Wed, Mar 7, 2018 at 4:36 PM Gail Badner
Hi,
This is an unusual mapping. My gut feeling is that it is not a valid
mapping, but I don't see anything in the spec that would indicate it is
invalid.
Here is the mapping:
@Entity
public class Product {
@Id
@Column(name = "id")
private int id;
@OneToOne(cascade =