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:
> >
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
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
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: