Re: Derived class guesses table name even when parent specifies it
Jacob Smullyan <[email protected]> Fri, 22 Jul 2005 13:55:58 -0400
| Newsgroups | gmane.comp.web.skunkweb |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Jul 16, 2005 at 06:34:11PM +0100, Hamish Lawson wrote: > It looks like there are two different ends to which class inheritance > can be put. The purpose you mention (and which I hadn't thought about) > is modelling table inheritance. On the other hand I was using class > inheritance to allow me to define additional methods without modifying > the autogenerated table class. I think my proposal may moderately > convenience the latter without affecting the former. > > My proposal only changes what happens when a table name is specified > in some class but not in a derived class: namely, that the derived > class should use the table name specified in its parent rather than > guess it. Since your scenario above doesn't specify ant table names, > it would be unaffected by this change. Moreover it's my guess that the > pattern I'm considering (A specifying a table name but B and C not > doing so) is unlikely to be used when modelling table inheritance; > either no class would specify a table name or all would. Instead the > pattern in question is most likely to be used when using class > inheritance for the purpose of API extension; and that, I suggest, is > when you'd want the semantics that I'm proposing. That's convincing to me. I've implemented it (I think) and am checking it in wnth a test case. js -- Jacob Smullyan
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC4TMuuqamFyFXXLIRAhdoAKC1SlfVLyrX8Ai4wua56WNRVF/oQgCeNOqz TbjnfSM6d6BFpM4v849HVxQ= =lUC4 -----END PGP SIGNATURE-----