Support `belongs_to` with the legacy `HasOne` field type
`belongs_to` now accepts `HasOne<E>` (legacy) in addition to the recommended `BelongsTo<E>` / `BelongsTo<Option<E>>`, so entities written against the earlier API keep compiling. A `HasOne`-typed `belongs_to` generates the pre-`BelongsTo` `ActiveHasOne` write path — it sets this row's own foreign key on save, with relation-keyed disambiguation for duplicate targets (two `belongs_to` to the same entity). `BelongsTo` remains the recommended type. Also fix `action()` skipping the insert of a brand-new row that has no column explicitly `Set` (e.g. an auto-increment-only primary key), which left the generated key unset and failed the subsequent model conversion. A genuinely new row (no primary key set) now always inserts, while an unchanged row that already has a primary key is still left untouched.
C
Chris Tsang committed
e17aa51e5f7e3f4b58c967fae23d39bdd64112f6
Parent: e94a44b