On Sep 27, 2011, at 12:49 PM, Chris Withers wrote: > On 27/09/2011 16:58, Michael Bayer wrote: >> >> ah, hm. interesting ! basically, not rea..^H^H^H OK actually this is >> very easy, using a technique I used previously to create abstract concrete >> mappers. This should probably be how we recommend people use reflection >> with mappings since this is way better than what you'd get with classical >> mappings: >> >> http://www.sqlalchemy.org/trac/wiki/UsageRecipes/DeclarativeReflectedBase > > That looks like it should ship with SA itself... > > Does it?
on the website, sure :) Many of these things are better as recipes - it is easier for us to support just the "__mapper_cls__" argument rather than a full usage pattern. Users are better off knowing how these things work, if we're just talking about 10 lines of code. In particular, the recipe would need modifications if it were being integrated with other __mapper_cls__ types of recipes, such as the "abstract base class" recipe (though that one *is* being superceded by a built in). A recipe is also a great way to keep the library as "just one way to do it" - the variety of overlapping use cases regarding mapping and reflection can remain as applications on top of a more succinct set of building blocks. Makes the library easier to understand when its boundaries are clear. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.