From: Ian B. <ia...@co...> - 2005-01-26 17:30:14
|
Oleg Broytmann wrote: > Hello! Let me look at it from another angle. > > Cuurently every user of SQLObject gets some kind of inheritance, for > free! (-: Like it or not, but this > > class Entity(SQLObject): > pass > > class Person(Entity): > pass > > is inheritance. According to > http://www.objectmatter.com/vbsf/docs/maptool/ormapping.html > it is "horizontal mapping". Yes. At one point this kind of inheritance was simply broken, and the resulting classes didn't function; I did what I thought was the most minimal thing possible to get them to work. From that perspective it wasn't a thoughtful way of implementing inheritance, but it was also the closest I could come to dodging the issue. Which is what I'm still trying to do ;) This inheritance does work well for abstract superclasses, and subclasses can share portions of their definition with their superclasses, but don't rely on the superclass in any way at runtime. This kind of inheritance doesn't add any kind of relation. > Daniel Savard's patch just adds another kind, vertival mapping. Yes. But I wasn't that happy with the first one either ;) Is there a way this can be added without changing SQLObject? E.g., as a SQLObject subclass? I assume some new (stable) hooks will be required, so I'm not saying SQLObject can't be changed for this, but I'd rather avoid the actual inheritance implementation being in SQLObject. -- Ian Bicking / ia...@co... / http://blog.ianbicking.org |