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 adapter is unusable #249

Open
burbas opened this issue Jan 2, 2016 · 13 comments
Open

Mongodb adapter is unusable #249

burbas opened this issue Jan 2, 2016 · 13 comments
Labels

Comments

@burbas
Copy link
Contributor

burbas commented Jan 2, 2016

Hi,

After upgrading to latest boss_db I quickly discovered that the mongo_db-adapter is broken. Not just a little broken, but the boss_db_adapter_mongodb and the application it relys on is missmatching so much that it's hard believing they should work togheter.

I might be wrong and it's a configuration error from my side, but compare the calls from boss_db_adapter_mongodb and the mongodb application yourself and see.

@danikp
Copy link
Member

danikp commented Jan 2, 2016

There is nothing changed to mongo-db driver or application it uses for last year. At least nothing significant. As I know few people out there use mongo as database, so I assume it should work. Could you be more specific on mismatches.

@burbas
Copy link
Contributor Author

burbas commented Jan 2, 2016

Look here:
https://github.com/ErlyORM/boss_db/blob/master/src/db_adapters/boss_db_adapter_mongodb.erl#L84

This calls mongo:connect/1 with a tuple. And as you can see here:

https://github.com/comtihon/mongodb-erlang/blob/v0.7.9/src/api/mongo.erl#L72

mongo:connect/1 expect the argument to be a list. This is just the tip of the issues I'm seeing :)

@danikp
Copy link
Member

danikp commented Jan 2, 2016

looks like a big work to do. I'm curios, how it worked for people till now.

@burbas
Copy link
Contributor Author

burbas commented Jan 2, 2016

I don't think people have upgraded to the new version. I'm actually kinda surprised that the mongodb-version in rebar.config was switched out in the first place when it does not even start.

@burbas
Copy link
Contributor Author

burbas commented Jan 2, 2016

I've started to rewrite the db_adapter, so hopefully I can send in a patch for this later today.

@danikp danikp added the Mongo label Jan 2, 2016
@danikp
Copy link
Member

danikp commented Mar 24, 2016

@burbas , did you succeeded in updating mongodb connector?

@burbas
Copy link
Contributor Author

burbas commented Mar 24, 2016

@danikp Hi. I started to rewrite the adapter, but there was so much things that had changed so I did a rollback instead (Of the mongo-lib). I can share my results tonight when I'm at home again. But I really want to rewrite the adapter to fit the current release of mongo.

@cloudtest
Copy link

Hello :)
Did you manage to rewrite the boss_db_adapter_mongo.erl file? I have just ran into this problem as I had to switch to R18 erlang, but this makes my app unusable. The earlier CB version was using the mongo driver from 2011, the api have totally changed since then. I would really appreciate any help. Thanks.

@burbas
Copy link
Contributor Author

burbas commented May 23, 2016

@cloudtest I've started to implement the changes needed for get the new mongodb driver to work, but there's still a lot of work left. Until then I think boss_db should drop the mongodb-support text in the README since this is a big lie :)

@Techoffload
Copy link

@burbas Any updates on this ? It has been > 2 years
Or if there are any workaround available

@burbas
Copy link
Contributor Author

burbas commented Dec 27, 2018

@Techoffload Crap, I forgot to push back my changes :(. Maybe I'll take a look at this during this week.

@Techoffload
Copy link

@burbas Any updates ?
Its ok if there is a workaround too.

@burbas
Copy link
Contributor Author

burbas commented Apr 15, 2019

@Techoffload I only have a partial fix for this. One workaround you can do is to take a older version of boss_db where the plugin works. It's a shame that the mongodb adapter lost support :(.

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

4 participants