Skip to content

Query: Navigations: Inverse one-to-one references not rewritten #7573

@anpete

Description

@anpete

In the following queries, the second nav. in each projection (ParentBackNavigation) is not processed during nav. rewrite. In the first case, it triggers a null-ref at execution time, and in the second, the EF.Property call is present in the final compiled query tree.

context.Children
	.Select(c => new
	{
		c.SelfReferenceBackNavigation,
		c.SelfReferenceBackNavigation.ParentBackNavigation
	});


context.Children
	.Select(c => new
	{
		SelfReferenceBackNavigation
		= EF.Property<IChild3409>(c, "SelfReferenceBackNavigation"),
		ParentBackNavigationB
		= EF.Property<IParent3409>(
			EF.Property<IChild3409>(c, "SelfReferenceBackNavigation"),
			"ParentBackNavigation")
	});

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions