Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve OneToOne description #10798

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/decorator/relations/OneToOne.ts
Expand Up @@ -5,17 +5,17 @@ import { RelationOptions } from "../options/RelationOptions"
import { ObjectUtils } from "../../util/ObjectUtils"

/**
* One-to-one relation allows to create direct relation between two entities. Entity1 have only one Entity2.
* Entity1 is an owner of the relationship, and storages Entity1 id on its own side.
* One-to-one relation allows the creation of a direct relation between two entities. Entity1 has only one Entity2.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* One-to-one relation allows the creation of a direct relation between two entities. Entity1 has only one Entity2.
* A one-to-one relation allows the creation of a direct relationship between two entities. Entity1 has only one Entity2.

* Entity1 is the owner of the relationship, and stores Entity2 id on its own side.
*/
export function OneToOne<T>(
typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>),
options?: RelationOptions,
): PropertyDecorator

/**
* One-to-one relation allows to create direct relation between two entities. Entity1 have only one Entity2.
* Entity1 is an owner of the relationship, and storages Entity1 id on its own side.
* One-to-one relation allows the creation of a direct relation between two entities. Entity1 has only one Entity2.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* One-to-one relation allows the creation of a direct relation between two entities. Entity1 has only one Entity2.
* A one-to-one relation allows the creation of a direct relationship between two entities. Entity1 has only one Entity2.

* Entity1 is the owner of the relationship, and stores Entity2 id on its own side.
*/
export function OneToOne<T>(
typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>),
Expand All @@ -24,8 +24,8 @@ export function OneToOne<T>(
): PropertyDecorator

/**
* One-to-one relation allows to create direct relation between two entities. Entity1 have only one Entity2.
* Entity1 is an owner of the relationship, and storages Entity1 id on its own side.
* One-to-one relation allows the creation of a direct relation between two entities. Entity1 has only one Entity2.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* One-to-one relation allows the creation of a direct relation between two entities. Entity1 has only one Entity2.
* A one-to-one relation allows the creation of a direct relationship between two entities. Entity1 has only one Entity2.

* Entity1 is the owner of the relationship, and stores Entity2 id on its own side.
*/
export function OneToOne<T>(
typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>),
Expand Down