spiral/framework

MongoDB ODM

solguru310 opened this issue · 8 comments

I have to build Web app using Spiral framework with mongoDB.
Is MongoDB ODM engine provided in the latest version of spiral framework or not?(v3.11)
As my hearing, this feature don't support in the latest framework version.
How can I integrate MongoDB with spiral framework?
Thank you.

We have frozen support for our own ODM. However, you can take any MongoDB integration and integrate it with the framework through bootloaders.

Thank you for your reply.
Could you help me to integrate MongoDB ODM with the framework?
I need a more detailed description.
I hope you can help me.

The MondoDB native ODM currently not maintained since we focused on Cycle ORM and modern DB can handle json. You can file a ticket and ask for ODM update, any donation or more community likes will prioritize this feature.

As for now I would recommend looking to Doctrine ODM - https://github.com/doctrine/mongodb-odm

It should be on part with ODM that used to be part of Spiral in the past.

how can i file a ticket and ask for ODM update?

Hi, wolfy-j.
I hope you can help.
I want to integrate mongoDB-odm to spiral framework v3.11.
How can I do that?

Hi!

It depends if you are willing to use existing ODM (such as Doctrine) - in this case you only have to write a bootloader and probably finalized (if it uses any sort of heap).

Or, if you want to do something more fun and create ODM based on what we had before: https://github.com/wolfy-j/lodm

I would recommend option one, in this case you have to check how to launch Doctrine ODM in standalone mode (it will tell you what has to be bootloader). You can probably also check some Laravel integrations, their service providers are quite similar to bootloaders and copy it. That's about it.

Hi, I want to use doctrine-mongo-odm in spiral framework.
how can i config it to start when server start and use easily.

I just described it above :) you create a bootloader and provide DI for it. There are nothing special about it. If you having issues - starts with simple controller work ODM init first.