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

Throw when attempting to lazy-load after no-tracking query #10851

Merged
merged 1 commit into from Feb 5, 2018

Conversation

ajcvickers
Copy link
Member

Part of #10042, #10509, #3797

It would be good to make this work in a future release, but this involves running a no-tracking query with fixup where the root entity is already materialized. For now, this will throw so we can make it work later without it being a breaking change.

Lazy-loading behaviors for non-tracked entities:

  • Proxies:
    • No-op if entity was explicitly detached
    • Throw if it was queried as no-tracking
  • Lazy-loading entities with loader service property:
    • No-op if entity was explicitly detached
    • Throw if it was queried as no-tracking
  • Lazy-loading entities without service property:
    • Throw even if entity was explicitly detached, but entity can set loader to null, or a service property can be defined
    • Throw if it was queried as no-tracking

Part of #10042, #10509, #3797

It would be good to make this work in a future release, but this involves running a no-tracking query with fixup where the root entity is already materialized. For now, this will throw so we can make it work later without it being a breaking change.

Lazy-loading behaviors for non-tracked entities:
* Proxies:
  * No-op if entity was explicitly detached
  * Throw if it was queried as no-tracking
* Lazy-loading entities with loader service property:
  * No-op if entity was explicitly detached
  * Throw if it was queried as no-tracking
* Lazy-loading entities without service property:
  * Throw even if entity was explicitly detached, but entity can set loader to null, or a service property can be defined
  * Throw if it was queried as no-tracking
@ajcvickers ajcvickers merged commit 4df8e7b into dev Feb 5, 2018
@smitpatel smitpatel deleted the TinyTearsMakeUpTheOcean0201 branch February 6, 2018 06:11
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

Successfully merging this pull request may close these issues.

None yet

2 participants