[prev] [thread] [next] [Date index for 2006/01/09]
This is a multi-part message in MIME format. --===============1943652974== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0329_01C614BA.21B795F0" This is a multi-part message in MIME format. ------=_NextPart_000_0329_01C614BA.21B795F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Having just installed a new server, I ran into the following problem. A relationship fails to load with the message: Need a Column, got <column name>. This message is coming from this method within Class::DBI::ColumnGrouper: sub add_column { my ($self, $col) = @_; # TODO remove this croak "Need a Column, got $col" unless $col->isa("Class::DBI::Column"); $self->{_allcol}->{ $col->name_lc } ||= $col; } The verstion of CDBI is 3.0.13 On the other servers I have version 3.0.1 sub add_column { my ($self, $name) = @_; return $name if ref $name; $self->{_allcol}->{ lc $name } ||= Class::DBI::Column->new($name); } OK, so this explains why code that used to work quit doing so. The question is - what should I be doing? The code which is causing me to go here is: $class->__grouper->add_group(TEMP => $accessor); I swiped this from Relationship::IsA whose code hasn't change as far as I can tell - and it probably fails too. The purpose of this statement is to create an accessor which stores the data indicated by the relationship. Is there a new paradigm for this expression which I should be switching to? Or is this an omission given the TODO statement above? Cheers, Kate ------=_NextPart_000_0329_01C614BA.21B795F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR></HEAD> <BODY> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial size=3D2>Having = just=20 installed a new server, I ran into the following problem. A = relationship=20 fails to load with the message: </FONT></SPAN></DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial size=3D2>Need a = Column, got=20 <column name>.</FONT></SPAN></DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial size=3D2>This = message is=20 coming from this method within = Class::DBI::ColumnGrouper:</FONT></SPAN></DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial size=3D2>sub = add_column=20 {<BR> my ($self, $col) =3D=20 @_;</FONT></SPAN></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial=20 size=3D2> # TODO remove=20 this<BR> croak "Need a Column, = got=20 $col" unless=20 $col->isa("Class::DBI::Column");<BR> &nbs= p; =20 $self->{_allcol}->{ $col->name_lc } ||=3D = $col;<BR>}</FONT></SPAN></DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial size=3D2>The = verstion of CDBI=20 is 3.0.13</FONT></SPAN></DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial size=3D2>On the = other servers=20 I have version 3.0.1</FONT></SPAN></DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial size=3D2>sub = add_column=20 {<BR> my ($self, $name) =3D @_;<BR> return $name = if ref=20 $name;<BR> $self->{_allcol}->{ lc $name } ||=3D=20 Class::DBI::Column->new($name);<BR>}</FONT></SPAN></DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial size=3D2>OK, so = this explains=20 why code that used to work quit doing so. The question is - what = should I=20 be doing? The code which is causing me to go here = is:</FONT></SPAN></DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial=20 size=3D2>$class->__grouper->add_group(TEMP =3D>=20 $accessor);</FONT></SPAN></DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial size=3D2>I = swiped this from=20 Relationship::IsA whose code hasn't change as far as I can tell - and it = probably fails too.</FONT></SPAN></DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial size=3D2>The = purpose of this=20 statement is to create an accessor which stores the data indicated by = the=20 relationship.</FONT></SPAN></DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial size=3D2>Is = there a new=20 paradigm for this expression which I should be switching to? Or is = this an=20 omission given the TODO statement above?</FONT></SPAN></DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D270230109-09012006><FONT face=3DArial=20 size=3D2>Cheers,<BR>Kate</FONT></SPAN></DIV></BODY></HTML> ------=_NextPart_000_0329_01C614BA.21B795F0-- --===============1943652974== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ClassDBI mailing list ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi --===============1943652974==--
[CDBI] add_column - bug or feature?
|
Re: [CDBI] add_column - bug or feature?
|
Re: [CDBI] add_column - bug or feature?
|
Re: [CDBI] add_column - bug or feature?
|
Generated at 09:31 on 23 Jan 2006 by mariachi v0.52