Re: Prefetch related data when using raw()

2012-07-30 Thread Sencha
Oh, and list() was required ;-) On Thursday, 26 July 2012 20:44:45 UTC+1, akaariai wrote: > > On 26 heinä, 19:12, Sencha wrote: > > I want to prefetch related data (ideally through the > prefetch_related()method), however I need to use the > > raw() mapper method that will map a custom query (

Re: Prefetch related data when using raw()

2012-07-30 Thread Sencha
That's absolutely perfect, works like a charm! Thank you very much for the insight. On Thursday, 26 July 2012 20:44:45 UTC+1, akaariai wrote: > > On 26 heinä, 19:12, Sencha wrote: > > I want to prefetch related data (ideally through the > prefetch_related()method), however I need to use the

Re: Prefetch related data when using raw()

2012-07-26 Thread akaariai
On 26 heinä, 19:12, Sencha wrote: > I want to prefetch related data (ideally through the > prefetch_related()method), however I need to use the > raw() mapper method that will map a custom query (complicated table joins > to filter my query properly) to my model. However when I try this I get: >

Prefetch related data when using raw()

2012-07-26 Thread Sencha
I want to prefetch related data (ideally through the prefetch_related()method), however I need to use the raw() mapper method that will map a custom query (complicated table joins to filter my query properly) to my model. However when I try this I get: AttributeError: 'RawQuerySet' object has n