[Dbix-class] multiple has_many rels in prefetch not supported in 0.081?

Moritz Onken onken at houseofdesign.de
Fri Oct 10 16:35:14 BST 2008


Am 10.10.2008 um 14:37 schrieb Moritz Onken:

> After talking to mst, the exception was degraded to a warn.
> Patch attached.
>
> greets,
>
> moritz
>
> <
> resultset
> .diff><test.diff>_______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk


Hi, especially mst,

we talked about rewriting _collapse_result to allow multiple has_many
joins on the same level.
I added some code to it, which basically removes any duplicates.
I know we talked about that on IRC and you told me that this is dirty
hack. As of that the code is only run if you set distinct => 1.
If set so the results are exactly what you would expect, no duplicates!

Please have a look and tell me if this is working for you or if we
should try something else.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 77collapseresult.t
Type: application/octet-stream
Size: 1622 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20081010/79cce8c5/77collapseresult.obj
-------------- next part --------------


Test attached. Simply set distinct => 0 to see how the tests fail
without it.

greets,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resultset.diff
Type: application/octet-stream
Size: 1679 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20081010/79cce8c5/resultset.obj
-------------- next part --------------


moritz




More information about the DBIx-Class mailing list