Skip Menu |

This queue is for tickets about the Rose-DBx-Garden-Catalyst CPAN distribution.

Report information
The Basics
Id: 37907
Status: resolved
Priority: 0/
Queue: Rose-DBx-Garden-Catalyst

People
Owner: Nobody in particular
Requestors: chuck [...] thephillipsonline.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.09_02
Fixed in: (no value)



Subject: edit/view seems to be broken for tables with a muti-column primary keys
First off, great tool you've developed. Looks like it will be a major time saver. Edit and View both seem to be broken for any table I have that has a muti-column primary key. The generated config hash in the generated controller for the table only includes one of the primary key columns for the "primary_key". When I click on a value in the list, I get the following error when it tries to bring up edit: "Cannot load blah blah without a primary key (key1, key2) with non-null values in all columns or another unique key with at least one non-null value." I'm assuming this error is thrown because the link to the edit action only includes half of the primary key. Thanks.
Subject: Re: [rt.cpan.org #37907] edit/view seems to be broken for tables with a muti-column primary keys
Date: Thu, 24 Jul 2008 13:16:22 -0500
To: bug-Rose-DBx-Garden-Catalyst [...] rt.cpan.org
From: Peter Karman <peter [...] peknet.com>
http://id.thunderchuck.com/ via RT wrote on 7/24/08 11:06 AM: Show quoted text
> Thu Jul 24 12:06:15 2008: Request 37907 was acted upon. > Transaction: Ticket created by http://id.thunderchuck.com/ > Queue: Rose-DBx-Garden-Catalyst > Subject: edit/view seems to be broken for tables with a muti-column > primary keys > Broken in: 0.09_02 > Severity: Important > Owner: Nobody > Requestors: chuck@thephillipsonline.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=37907 > > > > First off, great tool you've developed. Looks like it will be a major time saver.
Thanks. Show quoted text
> > Edit and View both seem to be broken for any table I have that has a muti-column primary key. > The generated config hash in the generated controller for the table only includes one of the > primary key columns for the "primary_key". >
yes, there used to be a generated comment as well in the controller indicating that multicolumn PKs were going to be an issue. I removed the comment in 0.09_xx but the issue remains. The problem is actually with CatalystX::CRUD and its lack of support for multi-column primary keys. There is some preliminary work in that direction done, but since I never use those kind of PKs myself, I haven't pushed it very far. Could you send along a small db schema using multi-value columns that I could use to develop a test case? That would help. -- Peter Karman . http://peknet.com/ . peter@peknet.com
From: chuck [...] thephillipsonline.com
Here ya go. Thanks for looking into it. On Thu Jul 24 14:16:56 2008, peter@peknet.com wrote: Show quoted text
> > > http://id.thunderchuck.com/ via RT wrote on 7/24/08 11:06 AM:
> > Thu Jul 24 12:06:15 2008: Request 37907 was acted upon. > > Transaction: Ticket created by http://id.thunderchuck.com/ > > Queue: Rose-DBx-Garden-Catalyst > > Subject: edit/view seems to be broken for tables with a muti-
> column
> > primary keys > > Broken in: 0.09_02 > > Severity: Important > > Owner: Nobody > > Requestors: chuck@thephillipsonline.com > > Status: new > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=37907 > > > > > > > First off, great tool you've developed. Looks like it will be a
> major time saver. > > Thanks. >
> > > > Edit and View both seem to be broken for any table I have that has a
> muti-column primary key.
> > The generated config hash in the generated controller for the table
> only includes one of the
> > primary key columns for the "primary_key". > >
> > yes, there used to be a generated comment as well in the controller > indicating > that multicolumn PKs were going to be an issue. I removed the comment > in 0.09_xx > but the issue remains. > > The problem is actually with CatalystX::CRUD and its lack of support > for > multi-column primary keys. There is some preliminary work in that > direction > done, but since I never use those kind of PKs myself, I haven't pushed > it very far. > > Could you send along a small db schema using multi-value columns that > I could > use to develop a test case? That would help. >
#========================================================================== # # Tables # #========================================================================== # CREATE TABLE playlist ( playlist_id VARCHAR(36) NOT NULL, name VARCHAR(40) NOT NULL, PRIMARY KEY (playlist_id), UNIQUE KEY IDX_playlist1(playlist_id) ); CREATE TABLE song ( song_id VARCHAR(36) NOT NULL, title VARCHAR(40) NOT NULL, PRIMARY KEY (song_id), UNIQUE KEY IDX_song1(song_id) ); CREATE TABLE playlist_song ( playlist_id VARCHAR(36) NOT NULL, song_id VARCHAR(36) NOT NULL, PRIMARY KEY (playlist_id, song_id), KEY IDX_playlist_song1(playlist_id), KEY IDX_playlist_song2(song_id) ); #========================================================================== # # Foreign Keys # #========================================================================== # ALTER TABLE playlist_song ADD FOREIGN KEY (playlist_id) REFERENCES playlist (playlist_id); ALTER TABLE playlist_song ADD FOREIGN KEY (song_id) REFERENCES song (song_id);
Subject: Re: [rt.cpan.org #37907] edit/view seems to be broken for tables with a muti-column primary keys
Date: Thu, 31 Jul 2008 20:47:16 -0500
To: bug-Rose-DBx-Garden-Catalyst [...] rt.cpan.org
From: Peter Karman <peter [...] peknet.com>
http://id.thunderchuck.com/ via RT wrote on 7/24/08 3:23 PM: Show quoted text
> Queue: Rose-DBx-Garden-Catalyst > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=37907 > > > Here ya go. Thanks for looking into it. >
Using your test sql I have worked up a new version of the required modules that seems to support multi-column PKs and non-serial (int) PKs. Please test it out and verify it does what you expect, and report back so I can push these new versions to CPAN. You will need: http://www.msi.umn.edu/~pek/rdg/Rose-DBx-Garden-Catalyst-0.09_04.tar.gz http://www.msi.umn.edu/~pek/rdg/Rose-DBx-Garden-0.15.tar.gz and the latest CatalystX::CRUD and CatalystX::CRUD::Controller::RHTMLO from svn: http://dev.catalyst.perl.org/repos/Catalyst/CatalystX-CRUD you'll want the versions in 'trunk' in that repository. Thanks. -- Peter Karman . http://peknet.com/ . peter@peknet.com
From: Chuck [...] thephillipsonline.com
At first glance it seems to be working perfectly now. I'll try to dig into it a bit more later. On Thu Jul 31 21:48:25 2008, peter@peknet.com wrote: Show quoted text
> > > http://id.thunderchuck.com/ via RT wrote on 7/24/08 3:23 PM:
> > Queue: Rose-DBx-Garden-Catalyst > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=37907 > > > > > Here ya go. Thanks for looking into it. > >
> > Using your test sql I have worked up a new version of the required > modules that > seems to support multi-column PKs and non-serial (int) PKs. > > Please test it out and verify it does what you expect, and report back > so I can > push these new versions to CPAN. > > You will need: > > http://www.msi.umn.edu/~pek/rdg/Rose-DBx-Garden-Catalyst- > 0.09_04.tar.gz > > http://www.msi.umn.edu/~pek/rdg/Rose-DBx-Garden-0.15.tar.gz > > and the latest CatalystX::CRUD and CatalystX::CRUD::Controller::RHTMLO > from svn: > > http://dev.catalyst.perl.org/repos/Catalyst/CatalystX-CRUD > > you'll want the versions in 'trunk' in that repository. > > Thanks.
Subject: Re: [rt.cpan.org #37907] edit/view seems to be broken for tables with a muti-column primary keys
Date: Wed, 13 Aug 2008 21:16:49 -0500
To: bug-Rose-DBx-Garden-Catalyst [...] rt.cpan.org
From: Peter Karman <peter [...] peknet.com>
http://id.thunderchuck.com/ via RT wrote on 8/7/08 3:27 PM: Show quoted text
> Queue: Rose-DBx-Garden-Catalyst > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=37907 > > > At first glance it seems to be working perfectly now. I'll try to dig into it a bit more later. >
I have uploaded version 0.09_04 to CPAN, along with the relevant CatalystX::CRUD dependencies. I will leave this ticket open until I get confirmation that all is well, or another week, whichever comes first. -- Peter Karman . http://peknet.com/ . peter@peknet.com
closed per previous message.