[Catalyst] DBIx relationships

J. Shirley jshirley at gmail.com
Sat Dec 8 01:07:00 GMT 2007


On Dec 7, 2007 11:20 AM, Angel Kolev <ankolev at gmail.com> wrote:

> Guys,
> i cant understand relationships yet (has_many and many_to_many too).
> I have 3 tables in my datebase:
> "males" (id,first_name,family_name) etc
> "females" (id,first_name,family_name) etc
> and "family" (id,family,city,address) etc
>
> All "id"s are equal. I have classes for all of them
> (MyApp::Males,::Females,::Family). Every male and female with same ID
> belongs to same ID in the "family" table. So i want to fetch one "line"
> through MyApp::Family at once. Something like:
> $c->model('AppModelDB::Family')->family
> #id,city,first_name(female),first_name(male)
>
> Thank you
>

First, two things:
#1. This is not the DBIC mailing list
#2. It is called "DBIx::Class" or "DBIC".  DBIx is an entire namespace
hosting many projects.  DBIx::Class is just one of those projects.

Thanks,
-Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071207/01e34=
4d3/attachment.htm


More information about the Catalyst mailing list