Ticket #668 (closed defect: fixed)

Opened 19 months ago

Last modified 10 months ago

Doctrine cannot parse query strings with keywords in them

Reported by: slickrick Owned by: jepso
Priority: blocker Milestone:
Component: Query/Hydration Version:
Severity: Keywords:
Cc: Has Test: no
Status: Pending Core Response Has Patch: no

Description

When adding keywords like OR, or AND in strings, Doctrine cannot parse the SQL into proper SQL

DQL Query:

FROM User u WHERE u.first_name LIKE '%Foo OR Bar%'

Expected Result:

FROM user u WHERE (u.first_name LIKE '%Foo OR Bar%')

Actual Result:

FROM user u WHERE (u.first_name LIKE '%Foo OR )

Change History

Changed 19 months ago by romanb

  • milestone set to beta3

Changed 19 months ago by romanb

What if you do: $conn->query("FROM User u WHERE u.first_name LIKE ?", array("%Foo OR Bar%")); ?

Changed 18 months ago by jwage

  • owner changed from zYne to jepso
  • milestone changed from beta3 to 1.0

That does fix it romanb, but I think it is still a problem that the parser fails if the dql string for setting, where conditions, etc. have keywords in them. I wonder if the new parser will fix this?

Changed 16 months ago by anonymous

  • milestone 1.0 deleted

Milestone 1.0 deleted

Changed 11 months ago by guilhermeblanco

  • status changed from new to closed
  • resolution set to fixed
  • has_patch unset
  • mystatus set to Pending Core Response
  • has_test unset

Fixed in trunk

Changed 11 months ago by guilhermeblanco

  • milestone changed from 2.0.0 to 1.0.0-RC1

This ticket was fixed in an earlier changeset that I cannot find. Added coverage for it in r4799.

Changed 10 months ago by anonymous

  • milestone New deleted

Milestone New deleted

Note: See TracTickets for help on using tickets.