Skip to content

Commit

Permalink
docs: update OneToMany grammar (#7252)
Browse files Browse the repository at this point in the history
  • Loading branch information
wi-ski committed Jan 11, 2021
1 parent ce9cb87 commit ea3bc35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/decorator/relations/OneToMany.ts
Expand Up @@ -2,8 +2,8 @@ import {getMetadataArgsStorage, ObjectType, RelationOptions} from "../../";
import {RelationMetadataArgs} from "../../metadata-args/RelationMetadataArgs";

/**
* One-to-many relation allows to create type of relation when Entity1 can have multiple instances of Entity2.
* Entity2 have only one Entity1. Entity2 is an owner of the relationship, and storages Entity1 id on its own side.
* One-to-many relation allows us to create a type of relation where Entity1 can have multiple instances of Entity2.
* Entity2 has only one Entity1. Entity2 is the owner of the relationship and stores Entity1's id on its own side.
*/
export function OneToMany<T>(typeFunctionOrTarget: string|((type?: any) => ObjectType<T>), inverseSide: string|((object: T) => any), options?: RelationOptions): PropertyDecorator {
return function (object: Object, propertyName: string) {
Expand Down

0 comments on commit ea3bc35

Please sign in to comment.