Decorator for creating a has-one relationship between models. Sets up a one-to-one relationship where a model has exactly one related model.
Factory function that returns the related model constructor
Optional
Optional custom resource name for the relation
A property decorator function
class User { @HasOne(() => Profile) profile: Profile;} Copy
class User { @HasOne(() => Profile) profile: Profile;}
Decorator for creating a has-one relationship between models. Sets up a one-to-one relationship where a model has exactly one related model.