[DBAL-553] PostgreSQL JSON Type Created: 03/Jul/13  Updated: 18/Feb/14  Resolved: 29/Dec/13

Status: Resolved
Project: Doctrine DBAL
Component/s: Platforms
Affects Version/s: None
Fix Version/s: 2.5
Security Level: All

Type: New Feature Priority: Minor
Reporter: Martin Prebio Assignee: Steve Müller
Resolution: Fixed Votes: 2
Labels: JSON, PostgreSQL

Issue Links:
Duplicate
is duplicated by DBAL-815 Returning a wrong field type for Post... Resolved

 Description   

Since version 9.2 PostgreSQL has a new data type for JSON fields: http://www.postgresql.org/docs/9.2/static/datatype-json.html

The current json_array datatype works on this field if it was not created by Doctrine but manually but it would be nice to support the field type also for schema generation.

I can offer a Pull Request for this change but I have not found a method for determining the database version.



 Comments   
Comment by Daniel Londero [ 18/Jul/13 ]

It would be great to have JSON datatype! In the mean time the solution is creating a "Custom Mapping Type", right?

Comment by Steve Müller [ 22/Dec/13 ]

Benjamin Eberlei We could adopt the GuidType implementation here with checking on the platform if it supports native json type and use that instead. What do you think?

Comment by Steve Müller [ 27/Dec/13 ]

Patch supplied in PR: https://github.com/doctrine/dbal/pull/469

Comment by Doctrine Bot [ 29/Dec/13 ]

A related Github Pull-Request [GH-469] was closed:
https://github.com/doctrine/dbal/pull/469

Comment by Benedikt Allendorf [ 16/Feb/14 ]

It seems that this feature is already in the documentation (http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html#mapping-matrix) although it is only included in the next version of DBAL (2.5).

Generated at Sat Oct 25 12:52:18 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.