Closed flavio closed 11 years ago
Hey -- thanks for this PR. This looks pretty good, and I'd be happy to take something like this.
Unfortunately, the code currently has some implicit assumptions that the SQL primary key is named _id
, so your example of renaming _id
doesn't work. I've pushed a commit to the pr-15 branch that contains a test case demonstrating the problem.
If you wanted to, I'd love to remove the implicit _id
assumption and make this work, but as a stop-gap, I'd also just merge a version that adds an assertion that _id
is not renamed, with the plan of improving the situation later.
Good points, I'm going to work on the issue you reported.
Everything should be working fine right now. Mosql handles properly also the tables with a primary key named in a different way.
Thanks! Merged, with some slight cleanup and an extra test.
Allow to rename MongoDB's attributes during the import.
In order to implement this feature I took some commits from @andrewjshults' dot-syntax branch.
This pull request introduces the new configuration format described inside of issue #4 but stays backward compatible with the current one.
It will be possible to mix the two configuration formats in this way: