Re: [sqlalchemy] Leveled single table inheritance without declarative API

2016-07-24 Thread Mike Bayer
On 07/25/2016 12:23 AM, Ameretat Reith wrote: mapper(Father1980,fathers,inherits=fathersMapper, polymorphic_identity='young-father') you have the wrong table above ("fathers" and not "fathers80s"). There's a bug here in how the ORM is corrupting the table in response to this which

Re: [sqlalchemy] Leveled single table inheritance without declarative API

2016-07-24 Thread Ameretat Reith
> > mapper(Father1980,fathers,inherits=fathersMapper, > >polymorphic_identity='young-father') > > you have the wrong table above ("fathers" and not "fathers80s"). > There's a bug here in how the ORM is corrupting the table in response > to this which I'll fix separately. I'm actually

Re: [sqlalchemy] Understanding behavior of association_proxy

2016-07-24 Thread Mike Bayer
On 07/24/2016 07:57 PM, Eric Wittle wrote: I'd like to understand the behavior of association_proxy when creating new records across a many-to-many table where, in some cases, the joining table will have additional attribute values beyond the two primary keys. In the below example, there is a

[sqlalchemy] Understanding behavior of association_proxy

2016-07-24 Thread Eric Wittle
I'd like to understand the behavior of association_proxy when creating new records across a many-to-many table where, in some cases, the joining table will have additional attribute values beyond the two primary keys. In the below example, there is a many-many between Person and Events

Re: [sqlalchemy] SQLAlchemy 1.1b2 TypeError: the JSON object must be str, not 'bytes' with mysql 5.7.12 and JSON field type

2016-07-24 Thread Eric Wittle
No special requirement for pymysql on my end, installed mysqlclient and now the test passes. Thanks for your help! On Sunday, July 24, 2016 at 5:09:34 PM UTC-4, Mike Bayer wrote: > > this mostly appears to be a pymysql issue (string values should be > decoded, mysqlclient acts correctly) so

Re: [sqlalchemy] Leveled single table inheritance without declarative API

2016-07-24 Thread Mike Bayer
On 07/23/2016 01:34 PM, Ameretat Reith wrote: I'm trying to make three `Guy', `Father' and `Father1980' models mapped to two `guys' and `fathers' tables. Fathers will inherit Guys and Father1980 will inherit Fathers. So I coded it as: | fromsqlalchemy

Re: [sqlalchemy] SQLAlchemy 1.1b2 TypeError: the JSON object must be str, not 'bytes' with mysql 5.7.12 and JSON field type

2016-07-24 Thread Mike Bayer
this mostly appears to be a pymysql issue (string values should be decoded, mysqlclient acts correctly) so I've reported it at https://github.com/PyMySQL/PyMySQL/issues/488 I'd install mysqlclient for now. Hopefully pymysql can respond if they'll fix this in time for SQLA 1.1 final.