Alias fields the mongoid way instead of using the alias command.
Update location of BSON.
In the mongoid 3 gem, running insert on a blank array returned a nil. On the mongoid 4 gem, running insert on a blank array causes a error 13066: "Message contains no documents". If we only run insert when bulk is not empty this fixes the issue.
Mongoid 4 does not seem to handle id overrides the same as Mongoid 3 does. setting field :id, as: :id seems to have allowed us to work around this issue as long as we use self['id'] when referencing our internal ID and any other when trying to get the mongo _id.