It depends on what kind of mapping you are using.

If it is mapped as integer, then the hydrators will cast the values to
integers when creating objects, and you should ensure that they stay as
integers inside your models.

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


On 27 March 2014 20:22, Timothy Lorens <[email protected]> wrote:

> I get that.  I also understand why you'd want this, but this doesn't help
> when forms posting STRINGs continually issue UPDATES when nothing has
> changed.   It doesn't seem proper to set data-types in the mappers to
> STRING when they're INTEGER in the database.  Feels icky. :(
>
>
> On Thursday, March 27, 2014 3:14:19 PM UTC-4, Marco Pivetta wrote:
>
>> On 27 March 2014 20:11, Timothy Lorens <[email protected]> wrote:
>>
>>>
>>> So my question is typical form data is going to be a string.. Regardless
>>> if I type in 0..9... Setting the field data-types in the XML mappers to the
>>> proper type in the database seems to be the correct way to go.. But with
>>> this logic, it seems as if Doctrine will ALWAYS issue an update because the
>>> data types don't match.
>>>
>>
>> Doctrine ORM does strict matching when comparing diffs, therefore "1" !==
>> 1.
>>
>>
>> Marco Pivetta
>>
>> http://twitter.com/Ocramius
>>
>> http://ocramius.github.com/
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to