Re: [sqlalchemy] Trying to understand FlushErrors when merging

2020-09-10 Thread Mike Bayer
When you create a Track object and don't assign the primary key attributes directly, the instance key of the object is all nulls: Track.__mapper__.identity_key_from_instance(track1) (, (1, None, None, None), None) Track.__mapper__.identity_key_from_instance(track2) (, (1, None, None, None),

[sqlalchemy] Trying to understand FlushErrors when merging

2020-09-10 Thread Jacob Pavlock
Hello! I am new to sqlalchemy and was hoping to get some insight on the following issue: import sqlalchemyfrom sqlalchemy import Column, Integer, Stringfrom sqlalchemy.ext.declarative import declarative_basefrom sqlalchemy.ext.hybrid import hybrid_propertyfrom sqlalchemy.orm import