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

Query: Should weak entites be tracked? #16999

Closed
smitpatel opened this issue Aug 7, 2019 · 2 comments · Fixed by #17043
Closed

Query: Should weak entites be tracked? #16999

smitpatel opened this issue Aug 7, 2019 · 2 comments · Fixed by #17043
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@smitpatel
Copy link
Contributor

#13036 made them non-trackable without "owner". We need to re-discuss when @AndriySvyryd is back.

@smitpatel smitpatel self-assigned this Aug 8, 2019
@smitpatel smitpatel added type-bug closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. and removed type-bug labels Aug 8, 2019
@smitpatel smitpatel added this to the 3.0.0 milestone Aug 8, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0, 3.0.0-preview9 Aug 21, 2019
@salaros
Copy link

salaros commented Sep 24, 2019

This PR breaks completely scenarios when an entity inherits an owned entity from its base class:

[Owned]
public class OwnedEntity
{
	public string Prop { get; set; }
}

public class A 
{
	public string Foo { get; set; }
}

public class B : A
{
	public string Bar { get; set; }
}

// ...

builder
	.OwnsOne(a => a.AuditLog); //<-- works only for base type

// ...

await dbContext.Set<B>().SingleOrDefaultAsync(e => e.Bar == bar); //<-- throws InvalidOperationException

@smitpatel
Copy link
Contributor Author

@salaros - Thanks for reporting. Filed #18024 to track the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants