Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.3
-
Fix Version/s: 2.3.1
-
Component/s: Mapping Drivers
-
Security Level: All
-
Labels:
Description
In a YAML configuration file
Behavior correct for this:
uniqueConstraints:
myConstraint:
columns: column1,column2
However, if I add a space in the "columns" list:
uniqueConstraints:
myConstraint:
columns: column1, column2
I end up with the following exception:
exception 'Doctrine\DBAL\Schema\SchemaException' with message 'There is no column with name ' column2' on table 'myTable'.
This can be very confusing, especially if (by any chance) you have a line return just on the space in the command line: you never see the space in the exception message.
It seems that YAML allows spaces in lists (http://en.wikipedia.org/wiki/YAML#Lists), but this line doesn't seem to be a YAML list. If it is parsed by Doctrine (split on ","), spaces should be ignored (or trimmed).
Activity
Fabio B. Silva
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Benjamin Eberlei [ beberlei ] | Fabio B. Silva [ fabio.bat.silva ] |
Fabio B. Silva
made changes -
| Status | Open [ 1 ] | In Progress [ 3 ] |
Fabio B. Silva
made changes -
| Status | In Progress [ 3 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
Benjamin Eberlei
made changes -
| Fix Version/s | 2.3.1 [ 10323 ] |
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-2069, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
Note that using the correct YAML format works:
uniqueConstraints: myConstraint: columns: [column1, column2]So it's confusing to have 2 possibilities to write the same thing, and that they don't behave the same.