Re: [sqlalchemy] Discriminator on association

2018-02-06 Thread Edu Ferreira
It works. Thanks. Em segunda-feira, 5 de fevereiro de 2018 14:29:29 UTC-2, Mike Bayer escreveu: > > On Mon, Feb 5, 2018 at 8:40 AM, Edu Ferreira <edug...@gmail.com > > wrote: > > Hello, i implemented a generic foreign key/relationship, using this > example: > >

[sqlalchemy] Discriminator on association

2018-02-05 Thread Edu Ferreira
Hello, i implemented a generic foreign key/relationship, using this example: http://docs.sqlalchemy.org/en/latest/_modules/examples/generic_associations/discriminator_on_association.html In the example addresses is passing in constructor: session.add_all([ Customer( name='customer

[sqlalchemy] Re: lazy='dynamic' with query_class

2017-03-21 Thread Edu Ferreira
That's ok, it's works well for me. Thank you. Em terça-feira, 28 de fevereiro de 2017 11:15:21 UTC-3, Edu Ferreira escreveu: > > Hello, i’ve been doing a work which i need to use a custom collection with > lazy=’dynamic’, and i saw that it’s not possible, and the right

[sqlalchemy] lazy='dynamic' with query_class

2017-02-28 Thread Edu Ferreira
Hello, i’ve been doing a work which i need to use a custom collection with lazy=’dynamic’, and i saw that it’s not possible, and the right way to do this is inheritance “Query”, something like this: from sqlalchemy.orm import Query class MyCollection(Query): … and after: