Hi, I ran into some trouble while trying to extend Jason Kohle's tutorial from a one-table database to a two-table database.
The tutorial had a people table with the following columns: id, name, and affiliation. I altered the affiliation column into an affiliation_code column. And then I created another table called affiliation to hold the affiliation_code and the affiliation_description. I also specified that the affiliation_code column in the people table was a foreign key which referenced the affiliation table's primary key. I then recreated the Model in the Catalyst Application. So now the people table had a 'belongs to' relationship with the affiliation table. With this arrangement, I am able to populate the grid with data from the affiliation table, but Catalyst throws up an error when I try to populate the grid with data from the people table. The error I get is : "[error] Caught exception in AdventAjaxGrid2::View::JSON->process "encountered object 'AdventAjaxGrid2::Model::AdventAjaxGrid2DB::Affiliation=HASH(0x91b8270)', but neither allow_blessed nor convert_blessed settings are enabled at /usr/local/share/perl/5.8.8/JSON/Any.pm line 426." I couldn't figure out how to enable those settings from the JSON-Any write up on CPAN. How is that to be done? Jagdish On Mon, Apr 20, 2009 at 12:23 AM, Craig McLaughlin <c...@bitbucket.com>wrote: > > > > On Sun, 19 Apr 2009 09:35:30 +0530, jagdish eashwar > <jagdish.eash...@gmail.com> wrote: > > Hi Peter, Scott and Craig, > > Thanks a lot. Commenting out 'console.log' worked. It works irrespective > > of > > whether I use 'Catalyst.uri_for' or 'c.uri_for'. I guess that line can be > > there only if one is using firebug. And I think the tutorial code worked > > for Craig because he was using firebug. Is that right Craig? Thanks to > > Scott for being so perceptive and to Peter for being persistent. > > Yes, I am running firebug. Interesting, I hadn't realized the implications > of that line. Going to remove it now. :D > > > > > _______________________________________________ > 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/