Doctrine 1
  1. Doctrine 1
  2. DC-1017

Floats persisted in the database are retrieve as strings.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Ubuntu 64 bits, php 5.3

      Description

      Someone complained about symfony padding 0's after floats http://stackoverflow.com/questions/6650786/remove-extra-decimal-place-in-float-datatype-on-symfony/6663829 , I think it's a doctrine problem, since the doctrine:dql task seems to have the same problem:

      >> doctrine executing dql query
      DQL: FROM UcVideoAspect
      found 1 results
      -
      id: '1'
      video_id: null
      pixel_ratio: '12.50'
      width: null
      height: null

      Here, pixel ratio is defined as a float in the schema.yml file
      Getting the property from a transient object returns a float, while getting it from the db returns a string.

        Activity

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Grégoire Paris
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: