Hi there,

I would like to have a dictionary like collection based on one of the
collections provided by sa like attribute_mapped_collection.

now my question: May I use id which is autogenerated and primary key as the
controlling attribute of the collection like:

    flagged_companies = relation(
        'tblCompany',
        secondary=tblCompany_has_Flag.__table__,
        backref="flags",
        collection_class=column_mapped_collection(flag_table.c.key)
    )

I understand, that this attribute may not change during the lifetime of the
collection, but the id column is only added after the a new flag object (that
provdes the id) is flushed to the db.

thanks
robert

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to