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

Conversation

pavlokolodka
Copy link
Contributor

Description of change

Improved the description of the OneToOne relationship and corrected related grammatical errors.

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run format to apply prettier formatting
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions explained in CONTRIBUTING.md

Copy link
Contributor

@RohanTalip RohanTalip left a comment

Choose a reason for hiding this comment

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

I'm not a maintainer, but if you're making changes here I had some more suggestions.

@@ -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.

*/
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.

@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants