Skip Menu |

This queue is for tickets about the DBIx-Class-Schema-Loader CPAN distribution.

Report information
The Basics
Id: 25944
Status: open
Priority: 0/
Queue: DBIx-Class-Schema-Loader

Owner: blblack [...]
Requestors: radek [...]

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)

Subject: "<foo_table> has no primary key" issued also for views
Download (untitled) / with headers
text/plain 270b
I'm loading a schema which contains views. DBIx::Class::Schema::Loader::Base->_load_classess() unconditionally whines about the lack of a primary key in tables it found. For views, this is pointless, as (at least in Postgres) it's not possible to mark a column as one.
Download (untitled) / with headers
text/plain 408b
I second this [old] request. It's an annoying -feature- ... perhaps a quick fix would be to 1) ignore pk definition altogether for views, or 2) look for first column of view to be named id and if so, add it is pk for ResultSource definition. Does this affect anybody else? Are there any workarounds, suggestions of a fix? I would gladly write up a patch if any comments received from the comments above...
Download (untitled) / with headers
text/plain 277b
An update on this ticket: the warning is now gone. The proper fix for this is to detect views separately from tables and generate proper DBIx::Class::ResultSource::View classes with the view SQL so that they can be redeployed. Until that is done, leaving this ticket open.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to