Re: [CDBI] Working with tables without primary keys?

[prev] [thread] [next] [Date index for 2005/11/08]

From: Matt S Trout
Subject: Re: [CDBI] Working with tables without primary keys?
Date: 17:09 on 08 Nov 2005
On Tue, Nov 08, 2005 at 10:50:43AM -0600, Eamon Daly wrote:
> I didn't realize that 'All' makes the left-hand item the PK.
> My hack was to define all columns as the PK, which seems to
> get me where I want to go. To answer the question "why?",
> though, I would think this is a pretty common technique:
> 
> package Test::Action;
> __PACKAGE__->columns(Primary => qw/person_id action/);
> 
> package Test::Person;
> __PACKAGE__->columns(All => qw/person_id person_name/);

That's just a two-column primary key though - not a table without a
primary key. The fact that you haven't yet required a column on Action
that isn't part of the PK (e.g. time_happened) doesn't mean you don't
have one at all.

        -- 
             Matt S Trout       Specialists in Perl consulting, web development, and
  Technical Director    UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

Re: [CDBI] Working with tables without primary keys?
Perrin Harkins 23:51 on 07 Nov 2005

Re: [CDBI] Working with tables without primary keys?
Perrin Harkins 17:08 on 08 Nov 2005

Re: [CDBI] Working with tables without primary keys?
Matt S Trout 17:09 on 08 Nov 2005

Re: [CDBI] Working with tables without primary keys?
Perrin Harkins 23:49 on 07 Nov 2005

Re: [CDBI] Working with tables without primary keys?
Left to My Own Devices 02:49 on 08 Nov 2005

RE: [CDBI] Working with tables without primary keys?
Mark Schoonover 03:55 on 08 Nov 2005

RE: [CDBI] Working with tables without primary keys?
Left to My Own Devices 03:12 on 08 Nov 2005

RE: [CDBI] Working with tables without primary keys?
Mark Schoonover 13:16 on 08 Nov 2005

Generated at 20:55 on 09 Nov 2005 by mariachi v0.52