[Dbix-class] inflate_results and source_name
Bill Moseley
moseley at hank.org
Mon May 3 03:21:11 GMT 2010
On Thu, Apr 29, 2010 at 2:08 PM, Matt S Trout <mst at shadowcat.co.uk> wrote:
> source_name is a proxy through to the result_source_instance in class dat=
a.
>
> 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.
>
Hum, Ok. You mean this?
$ cat Track1.pm
package MyApp::Result::Track1;
use parent MyApp::Result::Track;
__PACKAGE__->table(__PACKAGE__->table);
1;
(same for Track2 and Track3)
position 3, ref=3DMyApp::Result::Track3 source_name=3DTrack
position 2, ref=3DMyApp::Result::Track2 source_name=3DTrack
position 1, ref=3DMyApp::Result::Track1 source_name=3DTrack
How should the subclasses be set up so that I get this back instead:
position 3, ref=3DMyApp::Result::Track3 source_name=3DTrack3
position 2, ref=3DMyApp::Result::Track2 source_name=3DTrack2
position 1, ref=3DMyApp::Result::Track1 source_name=3DTrack1
Thanks,
-- =
Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20100502/e9f=
2de73/attachment.htm
More information about the DBIx-Class
mailing list