On May 25, 2012 11:10 AM, Puneet Kishor <punk.kish@gmail.com> wrote:

On May 25, 2012, at 10:02 AM, <gizmomathboy@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.

I don't see any examples for using JOINs as well.

Thanks,

gizmo