Giter Site home page Giter Site logo

Comments (4)

B4nan avatar B4nan commented on September 2, 2024 1

This is actually not really about MikroORM, the issue here is that your custom repositories for some entities are not even registered, like the one for AdminUser, because the @Repository decorator does not get executed before the ORM initialization.

I will probably remove that decorator in v5, it only adds weird issues like this. It can work only if you ensure the file will get required soon enough.

So to resolve this, drop your @Repository decorators from all custom repositories, and provide them via @Entity({ customRepository: () => AdminUserRepository }) etc.

from nestjs.

B4nan avatar B4nan commented on September 2, 2024

support for nest v8 was added in v4.3, you are using v4.2

so first try to upgrade to latest, it should be already fixed there

from nestjs.

Regan-entrostat avatar Regan-entrostat commented on September 2, 2024

This helped resolve quite a few of the DI failures though unfortunately not all of them. Thanks very much !

from nestjs.

Regan-entrostat avatar Regan-entrostat commented on September 2, 2024

So I am still running into the same issue as I have resented except but with different repositories. I have update the mikro-orm/nest package as suggested. The issue has been replicated and can be found in the link in the above issue. I have also adjusted the issue's stack trace and versions to reflect the changes.

from nestjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.