[Catalyst] Jason Kohles' tutorial on ExtJs editable data gridsandCatalyst

jagdish eashwar jagdish.eashwar at gmail.com
Sat May 2 16:22:48 GMT 2009


Hi Scott and Ian,

Thank you very much. That worked. But I'm still not clear why I need to use
the belongs_to relationship when the affiliation_id is directly available in
the People table. I can understand that if I had to pick up the
affiliation_description from the Affiliation table, I would have to use the
belongs_to relationship, but why I need to do that for the affiliation_id
also is not so obvious.

On Sat, May 2, 2009 at 2:13 AM, Ian Sillitoe <ian at sillit.com> wrote:

>
> You want to do..
>>
>> $person->affiliation_id-> affiliation_id
>>
>>
> Or you could change the name of the belongs_to() relationship in your mod=
el
> to something like "affiliation" rather than "affiliation_id" which seems
> more intuitive:
>
> $person->affiliation_id; # "id"
>
> $person->affiliation; #
> AdventAjaxGrid2::Model::AdventAjaxGrid2DB::Affiliation
>
> $person->affiliation->affiliation_id; # "id"
>
>
>
> --
> Ian Sillitoe
> CATH Team -- http://cathdb.info
>
>
>
> _______________________________________________
> 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/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090502/1336f=
20d/attachment.htm


More information about the Catalyst mailing list