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

One-to-one relationships and nullable reference types #788

Open
mtanneryd opened this issue Jan 19, 2023 · 2 comments
Open

One-to-one relationships and nullable reference types #788

mtanneryd opened this issue Jan 19, 2023 · 2 comments

Comments

@mtanneryd
Copy link

Hi!

I have a table, CompanyCredit, with a primary key that is also a foreign key to the primary key of another table, Company. So, I have a one-to-one mapping between CompanyCredit and Company. There are only entries in CompanyCredit for some of the companies so the nav prop CompanyCredit in Company needs to be nullable. But, currently I cannot get this to work in a project where nullable ref types are enabled.

@sjh37
Copy link
Owner

sjh37 commented Jan 21, 2023

Hi. Could you provide the SQL so I can create those tables to test with.

@mtanneryd
Copy link
Author

I decided to disable the nullable ref types after having consulted chatGPT... :-) But, I'll come back to this as soon as I get some free time. Thanks for a wonderful product!

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

No branches or pull requests

2 participants