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

Nullable embedded entities #5787

Closed
thynson opened this issue Mar 31, 2020 · 2 comments
Closed

Nullable embedded entities #5787

thynson opened this issue Mar 31, 2020 · 2 comments

Comments

@thynson
Copy link

thynson commented Mar 31, 2020

Issue type:

[ ] question
[ ] bug report
[x] feature request
[ ] documentation issue

TypeORM version:

[x] latest
[x] @next
[ ] 0.x.x (or put your version here)

Steps to reproduce or a small repository showing the problem:
I think it would be better to support nullable embedded entity.

class Name {
  @Column()
  first: string; // some times we don't want to specify nullable or not here
  @Column()
  last: string;
}

class Person {
  @Column(()=> Name, {nullable: true}) // we may need make the whole name optional here
  name?: Name
}
@imnotjames
Copy link
Contributor

duplicate of #3913

@holm
Copy link
Contributor

holm commented Feb 8, 2022

I can't really see how #3913 is a duplicate of this. This is about making columns on embedded columns nullable by setting the embedded column to nullable, the other is about updating all columns for an embed to null, but setting the embed to null.

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

No branches or pull requests

3 participants