cakephp-mongodb
cakephp-mongodb copied to clipboard
strict type juggling proposal
It seems like Model's typing is not sufficiently strict enough for a doc db? It appears to only cast date/time types. See my tests...if my schema the field "count" defined as in integer I only want it stored in mongo as an integer. Not a string.
If you are using mongo - you have to take responsibility for ensuring things are the right type on insert. see my comment here: https://github.com/ichikaway/cakephp-mongodb/issues/35#issuecomment-3427909
Incidentally,
In my own projects I would simply pass form data through a function to recurse on all values and cast int/floats as it found them. Relying on model schema to do it for you will mean any array/objects saved in your data will not have their values cast.