[Dancer-users] SimpleCRUD and multiple tables

Puneet Kishor punk.kish at gmail.com
Fri May 25 21:56:26 CEST 2012


On May 25, 2012, at 12:52 PM, <gizmomathboy at gmail.com> wrote:

> On May 25, 2012 11:10 AM, Puneet Kishor <punk.kish at gmail.com> wrote: 
> 
> On May 25, 2012, at 10:02 AM, <gizmomathboy at gmail.com> wrote: 
> 
> > Is there a way to access multiple tables using SimpleCRUD without using foreign keys? 
> > 
> > I have a relatively small database with a 3 tables or so but I don't have foreign keys between the tables. 
> 
> 
> I don't understand the motivation of the question. Having (or not) FKs has nothing to do with being able to query tables. Just make the appropriate JOINs and get going. FKs only allow you to pass the responsibility of ensuring data integrity to the database instead of coding it in the application. 
> 
> 
> Using Dancer::Plugin::SimpleCRUD there doesn't seem to be a way (from reading the documentation or search around for examples) to access more than 1 table in the simple_crud() call. It does look like you can use FKs to pull them into that 1 table.
> 


ahhh... I know nothing about that plugin. I tend to not use too much abstraction in my work as it only ends up confusing the heck out of me. If you have only 3 tables, you might do well to just hand code the darn thing.

On the other hand, as the wise saying goes, "A week of figuring it out can save you a few hours of doing it."

--
Puneet Kishor



More information about the Dancer-users mailing list