refVersion is out of sync by 1 for each version. This happens becuase the origin documents version number is not incremented untill after the mongose pre save hook is run.
Incrementing the versionCopy's refVersion (if not zero) mimics the behavour and caused the version number to correctly sync up.
Merge pull request #12 from ElectricHummingbird/master

when cloning a user schema unique indexes should be ignored.
Adds coveralls support and removes 0.6 tests
Adds coverage and working test scripts
Removes owl-deepcopy in favor of a custom path only schema clone implementation
Updates dependencies
Adjust code style
Adds tests for issue #10
Removes comment
Pulls turning off unique indices to clone-schema
Uses mongoose toObject instead of custom field copy mechanism
Extract functionality to set schema options to own module
Use debug module for writing debug messages and makes logError obsolete
Add coveralls badge
Merge pull request #11 from benjamta/master

refVersion is out of sync by 1 for each version. This happens becuase th...
update fork