Special ForeignModel
and BackRef
for one-to-one relations
#71
Labels
enhancement
New feature or request
ForeignModel
and BackRef
for one-to-one relations
#71
This is a classic many-to-one relation.
By adding
#[rorm(unique)]
todata: ForeignModel<Data>,
you turn it into a one-to-one relation.(technically "one-to-optional" would be more fitting, because a
Data
could still have zeroExtra
, but not more than one).However the
BackRef
onData
doesn't take not of this change. I'd like some specialized version ofBackRef
which only connects to#[rorm(unique)]
ForeignModel
s to provide extra semantics and methods.The text was updated successfully, but these errors were encountered: