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

Saving Entity with non-nullable navigation property on parent class #59

Open
graphicsxp opened this issue Jul 30, 2021 · 0 comments
Open

Comments

@graphicsxp
Copy link

I'm wondering if the below scenario is the expected behavior or if I'm doing something wrong :

Let's say I have the following classes on the backend

classs Product {
CategoryId : guid;
Category: Category;
}
class Vegetable extends Product { }

Then on the client side I load a Vegetable entity without expanding Category. If I try to save the entity, breeze will raise a Validation error on the Category being required. Indeed my Category is null because I did not expand it, however my CategoryId contains a valid GUID.

Therefore shouldn't breeze let me save the entity ? It seems wrong thatI have to expand all non-nullable navigation properties for saving the main entity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant