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 <i...@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 model
> 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@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/
>
>
_______________________________________________
List: Catalyst@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/

Reply via email to