So I have $client who has abstract table B which is implemented as B1, B2, B3,
and B4, all inheriting B.  There are no B rows.  However, there's table A
which asks for a "B" as a foreign key reference.

Now, how do I model this mess with Rose?  I suspect that the code that takes a
"B" key and turns it into the row can ask the database which "real" table name
the row belongs, and do the right thing.  (I've worked that out
somewhere... you can ask for the table oid for a row and do some magic in the
system tables to get the name of the table.)

But how many other things would this break?  If I tell Rose that following
A->B gives me a B, but it really gives a B1, does that violate any
assumptions?  And if I come back the other way, getting all rows of the
one-to-many in the other direction, can I tell Rose that it doesn't need to
call the code in B1... it can just call it in B?  And can I tell Rose that B1
@ISA B, so I can define generic additional B-like things for both the manager
and row classes?

And more importantly, has anyone *done* this already with Rose, so I don't
have to be the pioneer with the arrow in my head? :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to