-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
Cannot have a ForeignKey use same member as Identity #1226
Comments
@barclayadam Before I put much into fixing this, is this really necessary? If it's really one to one in the document, why not just have one single document type? |
@jeremydmiller Good question. Strictly speaking, I'd say no, it's possible to work around it. Our use case for this is two-fold:
If this does not go through as an enhancement, could it be changed to throw an exception? Tracking down the root cause with only a SQL error is tricky. I cannot remember the exact message but it was non-obvious why it was failing |
This issue looks to be fixed and working fine, will add a unit test for this. |
Unit test passed, closing this. |
It is not possible to have an entity that has a member that is used for both its Id and as a foreign key to another entity. For example:
The intention is to have a one-to-one relationship between parent
Foo
and it's childFooExtra
.This fails on the schema generation as no additional column is created for this foreign key.
Should this be supported, or should this throw earlier to identify this as being unsupported?
The text was updated successfully, but these errors were encountered: