On 02/23/2016 04:50 PM, Sergey Mozgovoy wrote:
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.
it sounds pretty useful, though a lot of these extension things are published as standalone projects, such as sqlalchemy-utils. that way they can be developed and released at a higher velocity until they are industrial strength. it also serves to ensure the maintenance burden is on the folks who created it; once it goes into SQLA direct, now *I* have to support it directly and that's a larger and larger burden for me.
----- 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 <mailto:sqlalchemy+unsubscr...@googlegroups.com>. To post to this group, send email to sqlalchemy@googlegroups.com <mailto:sqlalchemy@googlegroups.com>. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
-- 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.