Skip to content

Conversation

aaronpeterson
Copy link

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.

@AD7six
Copy link
Contributor

AD7six commented Jan 10, 2012

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

@AD7six
Copy link
Contributor

AD7six commented Jan 11, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants