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

People
Owner: blblack [...] gmail.com
Requestors: radek [...] pld-linux.org
Cc:
AdminCc:

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



Subject: "<foo_table> has no primary key" issued also for views
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 270
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.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-2538-1239576441-498.25944-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 408
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...
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6379-1347208136-1327.25944-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 277
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 Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.