Coder Social home page Coder Social logo

Comments (3)

sandrokeil avatar sandrokeil commented on June 14, 2024

@xtreamwayz Thank you for your question.

To share the orm configuration you should have a DoctrineOrmConfigurationFactory which creates a new instance of Doctrine\ORM\Configuration. Then retrieve this instance in your DoctrineConnectionFactory via the container (service locator).

With this approach you share the same configuration instance for orm_default and orm_second. You can also extend your connection array to configure all the things. A good but more complex example can you find in the DoctrineORMModule.

The same applies for the cache instance. Every object, which is used in a factory to create the specific instance, should be retrieved via the container (service locator). There is no reason why not to share the configuration and cache instance between the two database conncections and you have the option to make it configurable.

There are more benefits here. Less objects, one initialization (proxies) and one connection (redis).

from interop-config.

sandrokeil avatar sandrokeil commented on June 14, 2024

@xtreamwayz After some disucssions I'm working on a flexible config structure depth in #26 so you are now able to use all the options, independing under which key they are stored. Please take a look at the updated example section.

Have you any further suggestions or can you close this issue now?

from interop-config.

geerteltink avatar geerteltink commented on June 14, 2024

Oh, thank you very much. I'll play with these changes tomorrow.

from interop-config.

Related Issues (16)

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.