CDBI::Relationship::IsA issues with TEMP columns

[prev] [thread] [next] [Date index for 2004/11/23]

From: Peter Speltz
Subject: CDBI::Relationship::IsA issues with TEMP columns
Date: 21:57 on 23 Nov 2004
2 issues i'm having -- 
"base class" is related to "sub class" through an is_a relationship. (sub is_a
base).

1) in sub class if i define TEMP columns, the columns inherited from base seem
to dissappear.  I'm guessing is_a is built on the TEMP functionality of CDBI.
So you need to do something tricky to define TEMP columns in a sub class. 
Anyone know that line of code?  Sub->columns('TEMP' => ( Sub->columns('TEMP'),
qw/username pw/); maybe? 

 I noticed in IsA.pm that TEMP is used in all_columns sub but couldn't tell
what was happening. :(

2) If i define TEMP columns in the base class,

   Base->columns(All => qw/col1 col2 col3/);
   Base->columns(TEMP => qw/username pw/);

 and then include those TEMP columns in my "All" columns list in sub class, (
as I do all the other columns from the base class)

   Sub->columns(All => qw/col1 col2 col3 username pw/);

 then retrieves for sub class think the base class's TEMP cols are in the sub
class table.  I get this error:

DBD::mysql::st execute failed: Unknown column 'pw' in 'field list' [for
Statement "SELECT  pw, username . . ."

 It correctly does NOT try to get col1 , col2, or col3.
 
Is that clear enough?  It seems what is happening is TEMP columns in base class
aren't getting mapped properly to sub class.  Or more precisely they don't seem
to be getting mapped at all since the sub class thinks they are in it's table.
Maybe this is good or on purpose I don't know or i just am doing something
stupid, but it's stopping me from being able to do what i want to do. 

thanks,




=====
pjs


		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 

CDBI::Relationship::IsA issues with TEMP columns
Peter Speltz 21:57 on 23 Nov 2004

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