One-to-one relationships and nullable reference types
mtanneryd opened this issue · 2 comments
mtanneryd commented
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 commented
Hi. Could you provide the SQL so I can create those tables to test with.
mtanneryd commented
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!