-
Notifications
You must be signed in to change notification settings - Fork 126
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
Unable to find any child-parent relationship for the child type #181
Comments
I am getting this error as well, using fluent registration. Here is a simple example to duplicate the issue:
Is this supposed to work the way I've written it? |
In my example above, if I change it to use .RegisterEntity() instead of .GetDefaultEntityMapping(), it runs. |
RegisterEntity should be the right way when performing fluent registrations from scratch, as GetDefaultEntityMapping will make inferations that need to be overridden. Let me know if you do encounter any more problems in this area. |
Hi
Tanks for the coolio package
Unable to find any child-parent relationship for the child type analyzing the navigation property 'Users' on the parent entity.
What to do when i don't want the child items, i just want the parent flat without relationships?
THis doesn't seam to be working:
await db.GetAsync(new Foo { Id = id }, options => { options.WithEntityMappingOverride(OrmConfiguration.GetDefaultEntityMapping<Foo>().Clone().RemoveAllRelationships().RemoveProperty(x => x.Bar)); });
The original migration / model is from EF Core many to many.
Unable to find any child-parent relationship for the child type 'Bar' and the parent 'USer' when analyzing the navigation property 'Users' on the parent entity.
even tried with
.RemoveParentChildRelationship(x => x.Bar),
RemoveParentChildrenRelationship(x => x.Bar),
.RemoveChildParentRelationship(x => x.Bar),
The text was updated successfully, but these errors were encountered: