Re: more on inherited classes

[prev] [thread] [next] [Date index for 2004/07/28]

From: Charles Bailey
Subject: Re: more on inherited classes
Date: 01:48 on 28 Jul 2004
--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

more on inherited classes
Dana Hudes 22:33 on 27 Jul 2004

RE: more on inherited classes
Dana Hudes 01:33 on 28 Jul 2004

Re: more on inherited classes
Charles Bailey 01:48 on 28 Jul 2004

Re: more on inherited classes
Dana Hudes 02:03 on 28 Jul 2004

Re: more on inherited classes
Tony Bowden 06:38 on 28 Jul 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52