Re: [sqlalchemy] Is it possible to have a relationship to denormalized fileds in the same row?

2018-02-18 Thread Andrew Pashkin
Mike, are you open to to making sqlalchemy.orm.composite to accept keyword arguments to use for instantiation of the class? In that case - what signature should it have? On Monday, February 19, 2018 at 1:03:07 AM UTC+3, Mike Bayer wrote: > > This would be a composite: > >

Re: [sqlalchemy] Is it possible to have a relationship to denormalized fileds in the same row?

2018-02-18 Thread Andrew Pashkin
That's great, thanks! On Monday, February 19, 2018 at 1:03:07 AM UTC+3, Mike Bayer wrote: > > This would be a composite: > > http://docs.sqlalchemy.org/en/latest/orm/composites.html > > > On Feb 18, 2018 4:25 PM, "Andrew Pashkin" > wrote: > >> I wonder if it's possible

Re: [sqlalchemy] Is it possible to have a relationship to denormalized fileds in the same row?

2018-02-18 Thread Mike Bayer
This would be a composite: http://docs.sqlalchemy.org/en/latest/orm/composites.html On Feb 18, 2018 4:25 PM, "Andrew Pashkin" wrote: > I wonder if it's possible to have a field in a declarative model that > would have relationship semantics but at the same time would

[sqlalchemy] Is it possible to have a relationship to denormalized fileds in the same row?

2018-02-18 Thread Andrew Pashkin
I wonder if it's possible to have a field in a declarative model that would have relationship semantics but at the same time would be linked to a set of columns from the same row as the parent object and load the relationship without an additional join? -- SQLAlchemy - The Python SQL Toolkit