[Sqlalchemy-tickets] Issue #3859: JSON field with PostgreSQL and MySQL 5.7 (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
From: Leonardo R. <iss...@bi...> - 2016-11-22 14:28:11
|
New issue 3859: JSON field with PostgreSQL and MySQL 5.7 https://bitbucket.org/zzzeek/sqlalchemy/issues/3859/json-field-with-postgresql-and-mysql-57 Leonardo Rossi: Hi, I found a different behaviour of the JSON column working with on MySQL and on PostgreSQL. Somebody can say me if I did something wrong or it's a bug? I run the query `session.query(table).filter(table.js['hello'] == 'world').first()`, and: 1. with `sa.Column(sa.JSON().with_variant(postgresql.JSONB(), 'postgresql'),)` works on PostgreSQL but not with MySQL. 2. with `sa.Column(sa.JSON())` doesn't work with PostgreSQL but works with MySQL. p.s. I attached a fully example ready-to-run. |