On Dec 12, 2007 8:45 AM, Ted Zlatanov <[EMAIL PROTECTED]> wrote: > I played with the Cayenne Java ORM last week. I didn't like it much > (it's very inferior to RDBO, especially in auto-generating from the > schema), but one idea that caught my eye was the 'auto' hierarchy. > Basically you get a hierarchy like this (naming simplified): > > cayenne.BaseObject > parent of > db.auto.A > parent of > db.A > > where auto.A inherits from BaseObject, and A inherits from auto.A. > Customizations go in A. All the glue code (what > Rose::DB::Object::Loader woult generate) goes in db.auto.A. Only the > db.auto.* classes are regenerated after the first run (unless you > explicitly ask to overwrite the db.* classes). You can set the base > object to something other that BaseObject.
I'm not sure that kind of thing is necessary in Perl where you can alter any class at any time. In fact, it'd probably complicate matters since, in RDBO, the metadata object is class data that has to be cloned into derived classes. So you'd have this vestigial meta object lurking in the "middle" auto class for no reason (and changes to it wouldn't affect derived classes). The basic idea (safe repeated auto-generation with all customizations stored elsewhere) has been done several different ways in RDBO by others, and I've been meaning to formalize at least one way to do it. But I don't think I'd choose the "extra level of inheritance" technique. > Rose::DB::Object::Loader already supports base objects, but not this > kind of hierarchy AFAIK. It'd work (try it manually and see) but I don't think it's the best choice. -John ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object