Expand description
Relationship metadata for SQLModel Rust.
Relationships are defined at compile-time (via derive macros) and represented
as static metadata on each Model. This allows higher-level layers (query
builder, session/UoW, eager/lazy loaders) to generate correct SQL and load
related objects without runtime reflection.
Structs§
- Lazy
- A lazily-loaded related object that requires explicit load() call.
- Link
Table Info - Information about a link/join table for many-to-many relationships.
- Related
- A related single object (many-to-one or one-to-one).
- Related
Many - A collection of related objects (one-to-many or many-to-many).
- Relationship
Info - Metadata about a relationship between models.
Enums§
- Lazy
Load Strategy - Lazy loading strategy for relationships.
- Passive
Deletes - Passive delete behavior for relationships.
- Relationship
Kind - The type of relationship between two models.
Traits§
- Lazy
Loader - Minimal session interface needed to load lazy relationships.
Functions§
- find_
back_ relationship - Find the back-relationship from a target model back to the source.
- find_
relationship - Find a relationship by field name in a model’s RELATIONSHIPS.
- validate_
back_ populates - Validate that back_populates is symmetric between two models.