tecbot/mongodb-odm — comment on commit dd10565b70e2a82a302264603a6b909eebc49b29
File:  line 0
By jmikola:

Thanks for clarifying. This is still a huge BC break, though. Doctrine's console commands tends to abort with a one-line error message if a bad field mapping is encountered during index creation. As part of a much larger deployment script, that can easily go unnoticed and leave databases with only a small fraction of the defined indexes actually created.

I understand we all dropped the ball by not having adequate test coverage of the previous behavior. I spoke to @jwage last night about allowing unmapped fields to be sent to Mongo anyway. That would allow your field name conversion to work here and also in ee37d65fb73a29c7d80ee8f2adc48665f59f7030, without breaking old code. Ignoring exceptions for missing class metadata in these cases doesn't sound ideal, but an alternate solution to preserve BC would require non-trivial refactoring of #160. Even though the old behavior was broken (according to @jwage, field conversions should always have been occurring), it was consistently so for over a year. And if we do need to sharply break BC, I think that needs to be documented thoroughly.