This repository has been archived by the owner on Oct 10, 2022. It is now read-only.
Add RelationId to Column decorated properties #226
Labels
enhancement
new feature or bug with easy workaround
See this comment.
If a relation has only one column identifying it, and is the owning relation (or either side in a 1:1 relation), it's more concice to have that one
@Column
decorated property also contain a@RelationId
decorator for it. A column may contain multiple@RelationId
decorators for each such relation.If a relation is not the owning relation or has multiple columns forming its join, there won't be a relation ID anyway I guess.
On a related note, as per typeorm/typeorm#4112, it seems
@RelationId
is not supported for lazy relations, so I guess the command line option needs to change to allowing neither, eager only, lazy only, or both, withtrue
being alias for "eager only" until TypeORM adds support for lazy, at which point it could become "both".The text was updated successfully, but these errors were encountered: