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

Rajeev Prasad rp.neuli at yahoo.com
Sun Mar 24 22:28:13 GMT 2013


I tried to use delete_all, but there is no primary key in the table so it failed. what else can i do?

I need to delete all rows from a table and then add new ones based on logic. this happens once a day....


$schema->resultset('Mytable')->delete_all;


DBIx::Class::ResultSet::delete_all(): Operation requires a primary key to be declared on ........



More information about the DBIx-Class mailing list