Recently I ran into two cases that required some custom collection 
behavior, and it turned out that what I needed did not exist in SQLAlchemy, 
so I ended up implementing custom collection classes:

1) Nested mapped collections 
(http://stackoverflow.com/questions/23354380/how-do-i-create-a-multi-level-dictionary-backed-by-a-single-table-in-sqlalchemy).
2) A usual (non-nested) mapped collection that groups objects with equal 
keys into sets. So it maps objects' attribute to sets of objects (rather 
than to single objects, as ordinary "attribute_mapped_collection").

Clearly, the above cases can be regarded as just special case of a general 
collection class with extended capabilities. And association_proxy: 
sometimes we don't want objects themselves, just their property or 
attribute. So this collection class should be able to act like 
association_proxy, too.

What I came up with is kind of ad-hoc and half-baked implementation of this 
extended collection-mapping functionality. But I'd like to improve it, make 
things more general and share with the community.

Is this functionality used often enough to care ? Am I missing some 
extension or library for SQLAlchemy that does just exactly this ?

If not, I'd be glad to contribute to SQLAlchemy.

-----
Best regards,
Sergey

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to