Re: [Dbix-class] how to empty a Table? when there is no primary key

2013-03-27 Thread demerphq
On 27 March 2013 13:33, David Cantrell wrote: > On Wed, Mar 27, 2013 at 06:12:49AM +1100, Peter Rabbitson wrote: >> On Mon, Mar 25, 2013 at 03:57:45PM +, David Cantrell wrote: >> > I've always thought that this is something that should be handled by the >> > database, not by DBIx::Class - or a

Re: [Dbix-class] how to empty a Table? when there is no primary key

2013-03-27 Thread demerphq
On 26 March 2013 20:12, Peter Rabbitson wrote: > On Mon, Mar 25, 2013 at 03:57:45PM +, David Cantrell wrote: >> On Mon, Mar 25, 2013 at 11:58:31AM +1300, Paul Findlay wrote: >> > > I tried to use delete_all, but there is no primary key in the table so >> > > it failed. what else can i do? >>

Re: [Dbix-class] how to empty a Table? when there is no primary key

2013-03-27 Thread David Cantrell
On Wed, Mar 27, 2013 at 06:12:49AM +1100, Peter Rabbitson wrote: > On Mon, Mar 25, 2013 at 03:57:45PM +, David Cantrell wrote: > > I've always thought that this is something that should be handled by the > > database, not by DBIx::Class - or at least that it should be something > > that you hav

Re: [Dbix-class] how to empty a Table? when there is no primary key

2013-03-26 Thread Peter Rabbitson
On Mon, Mar 25, 2013 at 03:57:45PM +, David Cantrell wrote: > On Mon, Mar 25, 2013 at 11:58:31AM +1300, Paul Findlay wrote: > > > I tried to use delete_all, but there is no primary key in the table so it > > > failed. what else can i do? > > > > There is a discussion in the manual about this:

Re: [Dbix-class] how to empty a Table? when there is no primary key

2013-03-25 Thread David Cantrell
On Mon, Mar 25, 2013 at 11:58:31AM +1300, Paul Findlay wrote: > > I tried to use delete_all, but there is no primary key in the table so it > > failed. what else can i do? > > There is a discussion in the manual about this: > https://metacpan.org/module/DBIx::Class::Manual::Intro#The-Significance

RE: [Dbix-class] how to empty a Table? when there is no primary key

2013-03-24 Thread Paul Findlay
> I tried to use delete_all, but there is no primary key in the table so it > failed. what else can i do? There is a discussion in the manual about this: https://metacpan.org/module/DBIx::Class::Manual::Intro#The-Significance-and-Importance-of-Primary-Keys But you could alternatively use $schema