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

Derek W derekwrobel at gmail.com
Fri Sep 14 18:31:29 GMT 2012


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
<rbwohlfarth at gmail.com> wrote:
> On Fri, Sep 14, 2012 at 11:43 AM, Derek W <derekwrobel at 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 create helper could not - obviously.  Now that I'm
>> getting to the point of trying to add functionality such as deleting,
>> Catalyst seems to blow up because it requires primary key for such
>> calls as action_for('delete').
>
>
> I ran into something similar where I work. In the model code, I defined an
> auto number field as the primary key. That makes DBIx::Class happy.
>
> --
> Robert Wohlfarth
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>



-- 
Derek Wrobel
425-243-3355



More information about the Catalyst mailing list