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
Fix BaseEntity finder methods to allow lazy relation conditions #5710
Fix BaseEntity finder methods to allow lazy relation conditions #5710
Conversation
@pleerock any feedback here? |
TBH I would like to avoid merging this change, because I want to change lazy relation concept in the future versions. |
@pleerock is there any described plan on that? Will there be breaking changes? What is expected date when this issue can be fixed with "lazy relation concent in the future versions"? It is causing problems on our end because developers are very confused with this bug. |
There is no roadmap, but I was previously mentioned about it in other issues. Okay, let's merge it if its problematic with current version. |
test/other-issues/lazy-relations-loading-via-base-entitiy-finders/index.ts
Outdated
Show resolved
Hide resolved
@imnotjames fixed the issue. Can you please review again? |
@pleerock @imnotjames can you please merge this one? |
@bogdan This PR broke const p = entityManager.findOne(Post, { where: { id: 1 }}); Under TS 4.4.4, the inferred type of |
@alumni I can not reproduce that on current master. For me the type of |
@bogdan I check a bit more and it seems it's not particularly because of this PR, it only happens more often now, probably because of the added |
…onditions (typeorm#5710) Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
✨ This is an old work account. Please reference @brandonchinn178 for all future communication ✨ Note: the |
The following code:
Results in typecheck error when
Post#category
is a lazy relation while the finder does work.