[prev] [thread] [next] [Date index for 2005/11/25]
This is a multi-part message in MIME format. --===============0676872277== Content-Type: multipart/alternative; boundary="------------060804070705040408080500" This is a multi-part message in MIME format. --------------060804070705040408080500 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Matt S Trout schrieb: >On Fri, Nov 25, 2005 at 08:00:23PM +0100, Tilman Baumann wrote: > =20 > >>package LicServ::Option; >>use base 'LicServ::DBI'; >>LicServ::Option->table('option'); >>LicServ::Option->columns(Key =3D> qw(name product_id value)); >>LicServ::Option->has_a(product_id =3D> 'LicServ::Product'); >> =20 >> > >You haven't defined the Essential column group to tell Class::DBI which >columns to select when it retrieves an object. > >Defining All implicitly defines Essential, if not already defined.=20 > >Also note that you *must* have a primary key. If you think you don't hav= e one, >the primary key is effectively all columns - i.e. > =20 > Yea. right. I thought i allready tried to set all as primary. It did'nt work. Now i think it was a PEBACK :) >LicServ::Option->columns(All =3D> qw(name product_id value)); >LicServ::Option->columns(Primary =3D> qw(name product_id value)); > =20 > Perfect. This was it. I Tried only Primary but this didn't work. Giving Both is perfect. I see i wrote ->columns(Key =3D> ... Maybe that's the problem. I think i was confusing Key and Primary. (How do i come to Key?... %-) ) Perfect quick answer. I'm verry impressed. And of course pleased. ;) Regards --=20 Tilman Baumann Software Developer Collax GmbH . Boetzinger Stra=C3=9Fe 60 . 79111 Freiburg . Germany p: +49 (0) 761-4514-836 f: +49 (0) 761-4563-793 --------------060804070705040408080500 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content=3D"text/html;charset=3DUTF-8" http-equiv=3D"Content-Type"= > <title></title> </head> <body bgcolor=3D"#ffffff" text=3D"#000000"> Matt S Trout schrieb: <blockquote cite=3D"mid20051125192532.GC20180@xxxxxxx.xxxxxx.xxx" type=3D"cite"> <pre wrap=3D"">On Fri, Nov 25, 2005 at 08:00:23PM +0100, Tilman Baumann= wrote: </pre> <blockquote type=3D"cite"> <pre wrap=3D"">package LicServ::Option; use base 'LicServ::DBI'; LicServ::Option->table('option'); LicServ::Option->columns(Key =3D> qw(name product_id value)); LicServ::Option->has_a(product_id =3D> 'LicServ::Product'); </pre> </blockquote> <pre wrap=3D""><!----> You haven't defined the Essential column group to tell Class::DBI which columns to select when it retrieves an object. Defining All implicitly defines Essential, if not already defined.=20 Also note that you *must* have a primary key. If you think you don't have= one, the primary key is effectively all columns - i.e. </pre> </blockquote> Yea. right. I thought i allready tried to set all as primary. It did'nt work. Now i think it was a PEBACK :)<br> <blockquote cite=3D"mid20051125192532.GC20180@xxxxxxx.xxxxxx.xxx" type=3D"cite"> <pre wrap=3D""> LicServ::Option->columns(All =3D> qw(name product_id value)); LicServ::Option->columns(Primary =3D> qw(name product_id value)); </pre> </blockquote> <br> Perfect. This was it. I Tried only Primary but this didn't work. Giving Both is perfect.<br> I see i wrote ->columns(Key =3D> ... Maybe that's the problem. I think i was confusing Key and Primary. (How do i come to Key?... %-) )<br= > <br> <br> Perfect quick answer. I'm verry impressed. And of course pleased. ;)<br> <br> Regards<br> <pre class=3D"moz-signature" cols=3D"72">--=20 Tilman Baumann Software Developer Collax GmbH . Boetzinger Stra=C3=9Fe 60 . 79111 Freiburg . Germany p: +49 (0) 761-4514-836 f: +49 (0) 761-4563-793 </pre> </body> </html> --------------060804070705040408080500-- --===============0676872277== 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 --===============0676872277==--
[CDBI] problem with no primary key?
|
Re: [CDBI] problem with no primary key?
|
Re: [CDBI] problem with no primary key?
|
Generated at 14:51 on 01 Dec 2005 by mariachi v0.52