OneToOne class
Defines a one-to-one relationship.
Example:
@OneToOne(cascade: [CascadeType.all])
late Profile profile;
- Annotations
-
- @Target.new({TargetKind.field})
Constructors
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
- mappedBy → String?
-
The name of the field in the related entity that maps back to this one.
final
- 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