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

jagdish eashwar jagdish.eashwar at gmail.com
Fri May 1 15:20:58 GMT 2009


Thanks, Adam. With the debug line in the code, for $person->affiliation_id,
I get

[debug] Whats this -
AdventAjaxGrid2::Model::AdventAjaxGrid2DB::Affiliation=3DHASH(0xad06b00)
[debug] Whats this -
AdventAjaxGrid2::Model::AdventAjaxGrid2DB::Affiliation=3DHASH(0xad06a60)
[debug] Whats this -
AdventAjaxGrid2::Model::AdventAjaxGrid2DB::Affiliation=3DHASH(0xacff1e8)
[debug] Whats this -
AdventAjaxGrid2::Model::AdventAjaxGrid2DB::Affiliation=3DHASH(0xacff188)
[debug] Whats this -
AdventAjaxGrid2::Model::AdventAjaxGrid2DB::Affiliation=3DHASH(0xacff118)

If I change the debug line to get  $person->name, it gives me the following
nicely:

[debug] Whats this - Jagdish Eashwar
[debug] Whats this - Sushama Marathe
[debug] Whats this - Manasi Jagdish
[debug] Whats this - Ninad Jagdish
[debug] Whats this - Muttsy

The name column has no belongs_to relationship, but the affiliation_id
column has. That must be making the difference.


On Fri, May 1, 2009 at 4:16 PM, Adam Witney <awitney at sgul.ac.uk> wrote:

>
>> sub people_data : Local {
>>      my ( $self, $c ) =3D @_;
>>
>>      my $rs =3D $c->model( 'AdventAjaxGrid2DB::People' );
>>      my @people =3D ();
>>      while ( my $person =3D $rs->next ) {
>>          push( @people, {
>>              id          =3D> $person->id,
>>              name        =3D> $person->name,
>>              affiliation_id =3D> $person->affiliation_id,
>>
>
> I would guess that this line is returning an Affiliation object rather th=
an
> the affiliation_id then? You could test it by adding this line after the
> push
>
> $c->log->debug('Whats this - '.$person->affiliation_id."\n");
>
> if so then you would have to look at your Model.
>
> Maybe someone with more experience could tell you the likely reason for
> this?
>
>
> HTH
>
> adam
>
> _______________________________________________
> 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/20090501/dddaa=
454/attachment.htm


More information about the Catalyst mailing list