[Dbix-class] Views and tables without primary keys

IvorW m8sf-ijyo at xemaps.com
Sun Jul 6 13:21:22 BST 2008


I have an application that uses a view. The application uses
DBIx::Class::Schema::Loader, and I get a warning about primary keys,
every time I start the app. The application works fine. In fact I get
the warning when I use a MySQL database, but not when I use sqlite.

I've traced it in the source code to DBIx::Class::Schema::Loader::Base,
and I attach a patch which removes the warning. In theory, this warning
might be serving some purpose if you had a genuine table that didn't
have a primary key, but not for a view. This warning just gets in the way.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: base.patch
Type: text/x-patch
Size: 558 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20080706/e0=
cc635a/base.bin


More information about the DBIx-Class mailing list