Re: [Catalyst] Using Catalyst on MS SQL DB that has tables with no primary keys

2012-09-17 Thread Will Crawford
On 15 September 2012 03:38, Darren Duncan dar...@darrenduncan.net wrote: Brian Katzung wrote: If I recall correctly, I read in a cookbook somewhere (can't seem to find it now) that for rows with no primary key, you can use: __PACKAGE__-set_primary_key(__PACKAGE__-columns); (making the

Re: [Catalyst] Using Catalyst on MS SQL DB that has tables with no primary keys

2012-09-15 Thread Kieren Diment
And this answer demonstrates perfectly to your managers that their conception of 'database' is broken. -- Sent from my phone, so apologies for any spelling errors, brevity, etc. On 15/09/2012, at 12:38, Darren Duncan dar...@darrenduncan.net wrote: Brian Katzung wrote: If I recall

[Catalyst] Using Catalyst on MS SQL DB that has tables with no primary keys

2012-09-14 Thread Derek W
I seem to be going down a road that is unproductive...I was asked to make a web app to make simple CRUD changes to a few tables on our system (backend). I thought this would be simple, they want it created in Perl, so I searched for any nice frameworks that could accomplish this. I found

Re: [Catalyst] Using Catalyst on MS SQL DB that has tables with no primary keys

2012-09-14 Thread Robert Wohlfarth
On Fri, Sep 14, 2012 at 11:43 AM, Derek W derekwro...@gmail.com wrote: The problem is our database structure here. The 3 tables I need to use do not have any relationships set. There is no primary keys on these tables. I had to manually code the relationships between the tables because the

Re: [Catalyst] Using Catalyst on MS SQL DB that has tables with no primary keys

2012-09-14 Thread Derek W
Thanks, I figured that would probably fix it, but the problem is I am not allowed to make any changes to the DB structure itself. I suppose I need to convince them why it's in the best interest to have a primary key... On Fri, Sep 14, 2012 at 11:11 AM, Robert Wohlfarth rbwohlfa...@gmail.com

Re: [Catalyst] Using Catalyst on MS SQL DB that has tables with no primary keys

2012-09-14 Thread Robert Wohlfarth
On Fri, Sep 14, 2012 at 1:31 PM, Derek W derekwro...@gmail.com wrote: Thanks, I figured that would probably fix it, but the problem is I am not allowed to make any changes to the DB structure itself. I suppose I need to convince them why it's in the best interest to have a primary key...

Re: [Catalyst] Using Catalyst on MS SQL DB that has tables with no primary keys

2012-09-14 Thread Derek W
Ah, you meant just on Catalyst side, to tell it that the id column is the primary. I didn't think of that. Thanks! I'll give that a shot. On Fri, Sep 14, 2012 at 11:40 AM, Robert Wohlfarth rbwohlfa...@gmail.com wrote: On Fri, Sep 14, 2012 at 1:31 PM, Derek W derekwro...@gmail.com wrote:

Re: [Catalyst] Using Catalyst on MS SQL DB that has tables with no primary keys

2012-09-14 Thread Brian Katzung
If I recall correctly, I read in a cookbook somewhere (can't seem to find it now) that for rows with no primary key, you can use: __PACKAGE__-set_primary_key(__PACKAGE__-columns); (making the entire row be a multi-column primary key). - Brian On 2012-09-14 14:53, Derek W wrote: Ah, you

Re: [Catalyst] Using Catalyst on MS SQL DB that has tables with no primary keys

2012-09-14 Thread Darren Duncan
Brian Katzung wrote: If I recall correctly, I read in a cookbook somewhere (can't seem to find it now) that for rows with no primary key, you can use: __PACKAGE__-set_primary_key(__PACKAGE__-columns); (making the entire row be a multi-column primary key). Well that is indeed how things