Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Geographical
-
Labels:None
-
Environment:Symphony 1.4, PostgreSQL 8.4.8
Description
Added "Geographical" behaviour to an entity:
ZipCode:
actAs: [Geographical]
columns:
code: string
[...]
Using the standard Symfony-generated admin manager, when trying to insert a new record without specifying both latitude and longitude, Doctrine generates a wrong INSERT statement for PostgreSQL, including latitude and longitude as '' (empty string)
Doctrine_Connection->exec('INSERT INTO zip_code (hidden, code, country_id, latitude, longitude) VALUES (?, ?, ?, ?, ?)', array('false', '20133', '1', '', ''))
This cause this error:
SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type double precision: ""
Workaround
explicitly specifying float type for latitude and longitude...
actAs:
Geographical:
latitude: {type: float}
longitude: {type: float}
...still generate the column correctly as double precision in the database, but will not cause any error on inserting records.
Activity
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=DC-1014, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)