Skip to main content

Module relations

Module relations 

Source
Expand description

Relationship types (BelongsTo<T>, HasMany<T>, HasOne<T>).

These types serve as container wrappers for navigation properties, analogous to how EFCore represents navigation properties in the model.

They are pure marker/container types and do NOT impose entity trait bounds — the constraint belongs at the usage site (DbContext, builders), not on the container itself.

Structs§

BelongsTo
Represents a “belongs-to” navigation — the dependent side of a one-to-many or one-to-one relationship where the foreign key lives on this entity.
HasMany
Represents a “has-many” navigation — a collection of related entities.
HasOne
Represents a “has-one” navigation — a single related entity where the foreign key lives on the other side.

Enums§

DeleteBehavior
Specifies the delete behavior for a relationship. Corresponds to EFCore’s DeleteBehavior.

Type Aliases§

Through
Type alias for HasMany with an explicit join entity (many-to-many).