On 26 March 2013 20:12, Peter Rabbitson <rabbit+d...@rabbit.us> wrote:
> On Mon, Mar 25, 2013 at 03:57:45PM +0000, 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:
>> > https://metacpan.org/module/DBIx::Class::Manual::Intro#The-Significance-and-Importance-of-Primary-Keys
>> >
>> > But you could alternatively use
>> > $schema->resultset('Mytable')->delete;
>> >
>> > But this won't execute any on-delete triggers or cascade to MyTable's 
>> > relationships.
>>
>> 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 have to explicitly turn on in DBIx::Class to support data
>> sources which don't really do relationships.
>>
>
> When DBIC was first worked on (2005) most available data sources either
> did not handle FK constraints or (much more often the case, even today)
> did not have them declared.

I would not expect this to change. FK's are a major performance
bottleneck and any high load situation that can get away with it will
not use them.

Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to