[Dbix-class] inner join in prefetch drops some rows

Paul Makepeace paulm at paulm.com
Sun Jun 3 19:57:14 GMT 2007


On 5/27/07, Nigel Metheringham
<nigel.metheringham at dev.intechnology.co.uk> wrote:
>
> On 27 May 2007, at 18:31, Paul Makepeace wrote:
> > I notice adding a prefetch to a search causes some results to go
> > missing in the case that the column being joined on is null in the
> > first table. This is down to prefetch using an inner rather than left
> > join. Presumably y'all had a reason for that? The left join solved it
> > for me (in SQL tests). Is there a work-around for this?
>
> You can change the join type used in a relationship - see the
> join_type attribute in the DBIx::Class::Relationship::Base
> documentation (near the top of the page).

Have you tried your own advice? Because join_type => 'left' does not
appear to affect how prefetch works, at least afaics. ($VERSION =
'0.07006')

Devs, is having prefetch use an inner join a deliberate choice?

P

>
>         Nigel.
> --
> [ Nigel Metheringham           Nigel.Metheringham at InTechnology.co.uk ]
> [ - Comments in this message are my own and not ITO opinion/policy - ]



More information about the Dbix-class mailing list