Re: [sqlalchemy] Bug with join?

2016-06-14 Thread Drachenfels
> > > Article has a foreign key to Video and Video has a foreign key to Tag so > these can be joined either way. > This is a bit information I missed to be honest. I forgot that while Article has direct join to Video, Video can be joined to Article via Tag. I checked my relations so many time

[sqlalchemy] Bug with join?

2016-06-13 Thread Drachenfels
Hi guys, I found very strange behaviour of my script, after a lot of debugging it appears that SQLAlchemy complains about joins that I cannot see exactly why it has any issue with. Full running example is below in both as inline main.py script and link. In the nutshell, hierarchy of objects is

[sqlalchemy] Query-invoked autoflush error obfuscated by state_dict KeyError

2015-12-14 Thread Drachenfels
I have following method in my framework: @models.managed_commit def create_article(self, user_uid, title, **kwargs): user = user_manager.UserManager().get_user_by_uid(user_uid) # create empty article article = models.Article(user=user, title=title) # if pr