> > 2. "Table per instantiable class" (aka "horizontal mapping") > > a table for each instantiable subclass. each table has all columns, > > including pkey and all inherited columns. There may not be anything > > to ensure pkey uniqueness across these multiple tables. > > pro: query by class is easy > > con: following a foreign key to a base class (can go to any subclass) is > > awkward > > RDBO supports this, since it's just a simple one-table-per class > relationship.
Except for the "con" above. Consider the case where at a modeling level, some class member has a reference (foreign key) to an abstract class (e.g. "Contact") which could refer to any of the leaf instances. This gets awkward, to say the least -- either the foreign key value has to be structured ("vendor:17" or "customer:19"), or there has to be a discriminant column on the referring side. So it seems we are back to none of them being supported out of the box. That is not a dig at Rose; it is the embarrassing condition of all CPAN perl OR solutions, so far as I can see. Embarrassing, because even statically typed languages like C++ had solutions dealing with this stuff over a decade ago. Oh, and while I'm being grumpy, I don't see anything in the docs about the interaction between transactions and caching -- another basic challenge in any OR architecture. > But even that is hard to "DWIM." It'd > have > to be explicit: > > package Book; > use base 'Product'; > Book->meta(Product->meta->clone); > Book->add_columns(...); > Book->initialize; I guess I'm missing why those last 3 lines have to be explicit. Given all the other mysto-spooko stuff going on, surely DWIM is achievable? -mda ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object