Not specifying 'Essential' columns means only Primary key is pulled on first select
[prev]
[thread]
[next]
[Date index for 2004/11/17]
------=_Part_228_6520600.1100661244448
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
In the docs that it mentions that if you do not specifically name the
'Essential' columns of the database, then the 'Essential' columns will
be set to 'All' columns. This is what I expect to happen, but it is
not actually how it currently works in practice (in Class::DBI 0.96).
If you do not specify the 'Essential' columns, then 'Essential' will
be set to the primary key only. I'm pretty sure that this used to
work in older versions of Class::DBI, but I am not sure at what point
it stopped working.
The attached patch to Class::DBI::ColumnGrouper fixes the problem.
--
Cees Hek
------=_Part_228_6520600.1100661244448
Content-Type: text/x-patch; name="classdbi-essentials.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="classdbi-essentials.patch"
--- ColumnGrouper.pm.orig=09Wed Nov 17 13:59:46 2004
+++ ColumnGrouper.pm=09Wed Nov 17 14:00:12 2004
@@ -104,7 +104,7 @@
=09=09and not $self->group_cols('Primary');
=09$self->add_group(Essential =3D> @names)
=09=09if $group eq "All"
-=09=09and !$self->essential;
+=09=09and !$self->group_cols('Essential');
=09@names =3D _unique($self->primary, @names) if $group eq "Essential";
=20
=09my @cols =3D map $self->add_column($_), @names;
------=_Part_228_6520600.1100661244448--
|
Not specifying 'Essential' columns means only Primary key is pulled on first select
Cees Hek 03:14 on 17 Nov 2004
|