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

MongoDB ODM #1081

Open
solguru310 opened this issue Feb 18, 2024 · 8 comments
Open

MongoDB ODM #1081

solguru310 opened this issue Feb 18, 2024 · 8 comments
Assignees
Labels

Comments

@solguru310
Copy link

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.

@roxblnfk
Copy link
Member

roxblnfk commented Feb 18, 2024

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

@solguru310
Copy link
Author

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.

@wolfy-j
Copy link
Member

wolfy-j commented Feb 18, 2024

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.

@solguru310
Copy link
Author

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

@solguru310
Copy link
Author

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

@wolfy-j
Copy link
Member

wolfy-j commented Feb 22, 2024

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.

@solguru310
Copy link
Author

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

@wolfy-j
Copy link
Member

wolfy-j commented Feb 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants