Closed steelbrain closed 9 years ago
the behaviour of the original driver cannot be replicated because you cannot accept values by reference and also values.
sorry :( you must use the workaround.
Quite sad :(
I have read the conversations and found out that the reference is there because the mongofill driver inserts the _id
into the object. I solved it by generating a MongoId myself and giving it to mongofill and editing the source of it and removing that function that inserts it and the &
that was causing the problem. That works fine for me, Thanks :)
@steelbrain can you give me more infomation about this? I have ran into the same issue
@ChrisFrench This is more of a runtime limitation and the fact that this package requires references, the problem and the workaround are in the first post. The long-time solution for me was to fork this package and remove the reference requirement in most of the public methods
@steelbrain ahh funny I actually thought of doing the same. I have a whole suite of tools that can use mongo, and I was trying to use this as a fall back so it could run on cheap hosting.
Do you have that fork around by chance?
@ChrisFrench This is my fork https://github.com/ZoomPK/mongofill I would advise you read my commits before using so you know what it does differently
It's annoying and painful to store your objects in variables prior to executing insert in them. Here's the error message.
It disallows inserts like
Here's the workaround
I believe you have something like this in your codebase that's causing it
just remove that
&
and I'll be happy as in pie.