Re: [sqlalchemy] association proxy through composite key relation not working as expected. "KeyError: 'request_server'"

2019-04-25 Thread Jan Sakalos
Hi, many thanks for help, i had feeling it can be something simple, but was overlooking this permanently. Have nice day Jano On Thu, Apr 25, 2019 at 6:04 PM Mike Bayer wrote: > oh nevermind, this is a simple issue: > > patches = association_proxy( > "patches", "patch", creator=lamb

Re: [sqlalchemy] association proxy through composite key relation not working as expected. "KeyError: 'request_server'"

2019-04-25 Thread Mike Bayer
oh nevermind, this is a simple issue: patches = association_proxy( "patches", "patch", creator=lambda p: Server2Patch(patch=p) ) conflicts with: request_server = relationship( "Request2Server", backref=backref("patches"), foreign_keys=[ re

Re: [sqlalchemy] association proxy through composite key relation not working as expected. "KeyError: 'request_server'"

2019-04-25 Thread Mike Bayer
On Thu, Apr 25, 2019 at 8:34 AM Jan Sakalos wrote: > > Hello, > > I have to association proxies in code one is working and other not. I went > through it many times and wasnt able to identify issue. > Also please can you give me advice how to debug such issues if there is any? The error is that

[sqlalchemy] association proxy through composite key relation not working as expected. "KeyError: 'request_server'"

2019-04-25 Thread Jan Sakalos
Hello, I have to association proxies in code one is working and other not. I went through it many times and wasnt able to identify issue. Also please can you give me advice how to debug such issues if there is any? Thanks Jano code: from sqlalchemy import Column, Integer, String, ForeignKey,