[Dbix-class] inflate_results and source_name

Matt S Trout mst at shadowcat.co.uk
Thu Apr 29 21:08:10 GMT 2010


On Thu, Apr 29, 2010 at 10:58:11AM -0700, Bill Moseley wrote:
> Looking at the cookbook for inflate_result, does the source_name need to be
> explicitly set somehow?
> I'm a bit confused because it is getting set to one of the new classes, but
> the same for all.

source_name is a proxy through to the result_source_instance in class data.

If you don't call

__PACKAGE__->table(__PACKAGE__->table);

in a subclass to get a new source, you don't have a new source.

So you've just set it four times on the same thing and the last one will
win.

-- 
Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue

http://shadowcat.co.uk/blog/matt-s-trout/   http://twitter.com/shadowcat_mst/

Email me now on mst (at) shadowcat.co.uk and let's chat about how our Catalyst
commercial support, training and consultancy packages could help your team.



More information about the DBIx-Class mailing list