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

How use the query builder? #3

Open
Nisgrak opened this issue Aug 14, 2024 · 1 comment
Open

How use the query builder? #3

Nisgrak opened this issue Aug 14, 2024 · 1 comment

Comments

@Nisgrak
Copy link

Nisgrak commented Aug 14, 2024

Hi!

First, thanks for the module, it's very helpful.

I'm trying to use the createQueryBuilder method from the em, but looks like the type of EntityManager have the "core" Connection and not the DB specific one (the first info panel in this https://mikro-orm.io/docs/query-builder).

It's mandatory to override the type with as?

Thanks for your help!

@boenrobot
Copy link
Owner

Yes. The type in the getEntityManager() should be overriden with the type from your driver.

Hm... I suppose I could introduce an interface that this function would reference... which should mean you can override once in your nuxt config and be done across your project. I'll have to play around to see how that would work out in practice.

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

2 participants