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

Schema not inherited in query with relations #4472

Closed
LMoota opened this issue Jun 20, 2023 · 2 comments · Fixed by #4477
Closed

Schema not inherited in query with relations #4472

LMoota opened this issue Jun 20, 2023 · 2 comments · Fixed by #4477
Labels
bug Something isn't working

Comments

@LMoota
Copy link

LMoota commented Jun 20, 2023

Describe the bug
When performing a query with relations and using a JOINED type strategy, the schema is not inherited by the related entity.

Remember that both entities must use the wildcard operator in schemas.
SELECT_IN strategy works.

To Reproduce
Steps to reproduce the behavior:

  1. Create an entity with wildcard schema
  2. Create another entity with wildcard schema
  3. Perform a query operation using the JOINED strategy in a schema other than the default one.

Versions

Dependency Version
mikro-orm 5.7.12
@B4nan
Copy link
Member

B4nan commented Jun 20, 2023

Please provide complete reproduction as code, this is not enough.

Tried to use joined strategy in this test and it seems to be working fine:

https://github.com/mikro-orm/mikro-orm/blob/master/tests/features/multiple-schemas/multiple-schemas.postgres.test.ts#L124

@LMoota
Copy link
Author

LMoota commented Jun 20, 2023

@B4nan, execute this test:
https://pastebin.com/YkFtVj3N

mlusca added a commit to mlusca/mikro-orm that referenced this issue Jun 22, 2023
@B4nan B4nan added bug Something isn't working needs clarification and removed needs clarification labels Jun 22, 2023
B4nan pushed a commit that referenced this issue Jun 23, 2023
When both tables have wildcard schema, join not use the correct schema.

Closes #4472
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants