Re: [Dbix-class] Multiple joins, noob questions

2011-05-14 Thread Denny
at the user / role / user_role bits of ShinyCMS for an example that I think is pretty close to what you're trying to do: https://github.com/denny/ShinyCMS/blob/master/lib/ShinyCMS/Schema/Result/User.pm https://github.com/denny/ShinyCMS/blob/master/lib/ShinyCMS/Schema/Result/Role.pm https

Re: [Dbix-class] Managing error and stopping execution flow.

2010-03-18 Thread Denny
On Thu, 2010-03-18 at 11:07 +, David wrote: > Hi, > > I'm controlling errors in my code, but what I don't know is how to > manage them properly in Catalyst. > > When my application was not in Catalyst, I managed errord by launching > an error page and doing "exit 1;" to stop execution. > In C

Re: [Dbix-class] Regenerating schema following DBIC::Schema::Loader dump_to_dir?

2009-05-26 Thread Denny
On Tue, 2009-05-26 at 12:19 +0100, Chris Cole wrote: > Denny wrote: > > On Tue, 2009-05-26 at 09:21 +0100, Chris Cole wrote: > >> The problem seems to be that the current schema is a DBIx::Class::Schema > >> object, but in order to update it needs to be a > >> D

Re: [Dbix-class] Regenerating schema following DBIC::Schema::Loader dump_to_dir?

2009-05-26 Thread Denny
e DB modules using your main DB module as the starting point? Write a separate script which generates them instead - then it doesn't need to write over itself. I can send you an example of how I did it if you want, just mail me off-list. Regards, Denny __

Re: [Dbix-class] Getting a 'count' value

2009-05-14 Thread Denny
On Thu, 2009-05-14 at 14:16 +0200, Emmanuel Quevillon wrote: > I'd like to retrieve the value of a count returned by an SQL query. > > acc => $g->name(), > num => $c->model('Table')->search({'id' => $g->id}, > > where I tried to replace with : > > 1- )->all() > 2- { select =>[{'count' => '*'}],