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

Support for MongoDB #544

Closed
zane-shus opened this issue Mar 23, 2023 · 4 comments
Closed

Support for MongoDB #544

zane-shus opened this issue Mar 23, 2023 · 4 comments

Comments

@zane-shus
Copy link

Hello, I am using a mongodb, wondering if this project supports it?

https://github.com/jenssegers/laravel-mongodb

thanks

@verum-genus
Copy link

sorry, ignore me, i just saw this - #539

@27pchrisl
Copy link
Contributor

@zane-shus @verum-genus @Xuan-Goldenf - I have implemented support for MongoDB in v5.31.0. Let me know if it works okay for you.

@zane-shus
Copy link
Author

Thanks for this @27pchrisl , do you have a example of how to use it with an aggregation please?

I assume Property Renaming will work ok? https://lodata.io/modelling/drivers/renaming.html

And sorry if these are too general for this topi, but:
How do I manipulate the data before it goes back?
Also, how do I send additional parameters back?

@27pchrisl
Copy link
Contributor

Hi, if you're asking for aggregations like min/max/sum, then this isn't supported in Lodata yet.

Yes, property renaming works with this driver.

To manipulate the data before it goes back you could extend MongoEntitySet and override a relevant method, possibly bsonToEntity depending on what you want to do.

Lodata also implements Computed Properties and Generated Properties that might help with adding specific additional parameters.

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

No branches or pull requests

3 participants