Added option to set the parentId type

useful for people who use modules to change the id generator of mongodb (for example auto increment)