ManyToOne class
Defines a many-to-one relationship.
Example:
@ManyToOne()
late Department department;
- Annotations
-
- @Target.new({TargetKind.field})
Constructors
-
ManyToOne({FetchType fetch = FetchType.eager, List<
CascadeType> cascade = const [], bool optional = false}) -
const
Properties
-
cascade
→ List<
CascadeType> -
The cascade strategies to apply.
final
- fetch → FetchType
-
The fetch strategy (eager or lazy).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- optional → bool
-
Whether the relationship is optional (nullable).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited