MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / has_one

Method has_one

src/entity/base_entity.rs:82–87  ·  view source on GitHub ↗

Construct a has one relation

(_: R)

Source from the content-addressed store, hash-verified

80
81 /// Construct a has one relation
82 fn has_one<R>(_: R) -> RelationBuilder<Self, R>
83 where
84 R: EntityTrait + Related<Self>,
85 {
86 RelationBuilder::from_rel(RelationType::HasOne, R::to().rev(), true)
87 }
88
89 /// Construct a has many relation
90 fn has_many<R>(_: R) -> RelationBuilder<Self, R>

Callers

nothing calls this directly

Calls 1

revMethod · 0.80

Tested by

no test coverage detected