Re: more on inherited classes
[prev]
[thread]
[next]
[Date index for 2004/07/28]
--On Tuesday, July 27, 2004 6:33 PM -0400 Dana Hudes <dhudes@xxxxxx.xxxx>
wrote:
> Problem 1: the Essential columns of the parent are not included in the
> query
That's true of all column groups -- CDBI doesn't really take inheritance
into account when dealing with the connection between a class and a table.
(I don't know whether that's a philosophical stance or just a detail of the
current implementation.) You could probably change this by overriding
appropriate methods (at least group_cols, groups_for, and all_columns) in
Class::DBI::ColumnGrouper to account for columns from the superclass.
> Problem 2: _create guts the created object leaving only the primary key
> behind .
I think the rationale here was that later use of non-key accessors would
pick up any changes that had been made to the database by another process.
Once a column group is read (by calling an accessor for a column in that
group), outside changes to the DB are invisible until the object is updated
or cleared from the cache.
--
Regards,
Charles Bailey < bailey _at_ newman _dot_ upenn _dot_ edu >
Newman Center at the University of Pennsylvania
|
|
Re: more on inherited classes
Charles Bailey 01:48 on 28 Jul 2004
|