sunitparekh / data-anonymization

Want to use production data for testing, data-anonymization can help you.
MIT License
454 stars 94 forks source link

MongoDB document update changes data type int64 to int32 #73

Closed MRechtien-zz closed 4 years ago

MRechtien-zz commented 4 years ago

Hello, it looks like updates to int64 typed fields are changing type to int32. I haven't observed other data type mutations so far. before: image after: image

Is there a solution/workaround to prevent this? Thanks and regards, Markus

MRechtien-zz commented 4 years ago

I couldn't find a definite answer on this, but it seems that it's not supported by the driver: https://jira.mongodb.org/browse/RUBY-780 Therefore I've created a workaround by changing the mongodb Blacklist strategy to use a different update approach - only updating values that are generated by field anonymization. Not sure if this is of value for this project, but if so, feel free to use the PR I've created for it: https://github.com/sunitparekh/data-anonymization/pull/74