Closed alprinias closed 1 year ago
Hi Alex,
I can't replicate the problem. I add two classes, draw the association, and change the cardinality from *
to 0..1
I generate the code and can run add-migration and update-database without issue:
PM> add-migration Initial
Build started...
Build succeeded.
To undo this action, use Remove-Migration.
PM> update-database
Build started...
Build succeeded.
Applying migration '20221009131512_Initial'.
Done.
PM>
I flipped the cardinalities around and tried again. Still no problem
PM> add-migration Initial
Build started...
Build succeeded.
To undo this action, use Remove-Migration.
PM> update-database
Build started...
Build succeeded.
Applying migration '20221009131957_Initial'.
Done.
PM>
Adding defined foreign key properties with each cardinality version worked as well.
Oh, well, I can't re-reproduce it either! I suppose it will remain as one of the not-worth-the-effort-to-find-out-what-had-originally-caused-them "features". Sorry for the false alarm! Alex
Hi,
EFCore 6. I'm creating a bidirectional 1 -> 0..1 association. The modeler does not complain (and does not open the extra properties for the user to indicate which of the association ends is the pricncipal and which is the dependant). The code generates without a problem. But the migration gives a problem complaining that it cannot tell which is the dependant end.
I would expect that to be a problem for 1->1 and 0..1 -> 0..1 assoceiations but not for 1->0..1.
Best, Alex