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

1 to 1 mapping may be null #62

Closed
xclayl opened this issue Feb 21, 2014 · 1 comment
Closed

1 to 1 mapping may be null #62

xclayl opened this issue Feb 21, 2014 · 1 comment

Comments

@xclayl
Copy link

xclayl commented Feb 21, 2014

We referencing a back reference in a 1 to 1 association, the back reference record may not exist, so the join should be a left join, not an inner join. For example:

from p in cxt.Products
select new {
   p.ShoeDetail
}

Not all products have a ShoeDetail record (only shoes have a ShoeDetail record)

@igor-tkachev
Copy link
Member

Use CanBeNull field of the Association attribute.

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

No branches or pull requests

2 participants