Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1148

[Patch] Auto infer parameter type in DQL

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Component/s: DQL
    • Security Level: All
    • Labels:
      None

      Activity

      Hide
      Benjamin Eberlei added a comment -

      instanceof DateTimeZone is just wrong. drop that whole branch, TZ only saves the timezone from a DateTime object, infering TYPE::DECIMAL sounds dangerous to me, i would drop that one aswell. The array check has a bug, you call key() and then do nothing with the $key instaed check is_integer on the $value again, which is always an array from the previous check.

      Show
      Benjamin Eberlei added a comment - instanceof DateTimeZone is just wrong. drop that whole branch, TZ only saves the timezone from a DateTime object, infering TYPE::DECIMAL sounds dangerous to me, i would drop that one aswell. The array check has a bug, you call key() and then do nothing with the $key instaed check is_integer on the $value again, which is always an array from the previous check.
      Hide
      Benjamin Eberlei added a comment -

      I thought you wanted to infer the types from the left hand sides of the DQL conditions?

      Show
      Benjamin Eberlei added a comment - I thought you wanted to infer the types from the left hand sides of the DQL conditions?
      Show
      Guilherme Blanco added a comment - Implemented: https://github.com/doctrine/doctrine2/commit/8e3fdc5adc0facd4b44f9054ab3681e46131ba8a

        People

        • Assignee:
          Guilherme Blanco
          Reporter:
          Guilherme Blanco
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: