Wednesday, May 29, 2013

Re: ORM Prefetch related and only()

There is no way to alter the behavior of prefetch_related. It fetches
the related objects with the query defined by the related manager and
that's it.

- Anssi

On 29 touko, 19:40, Àlex Pérez <alex.pe...@bebabum.com> wrote:
> I want to know if there is a way that the query that is executed to get the
> prefetch related information can get only certains values, actually that
> only works for select_related,
>
> May be i have done something wrong but the prefetch_related query is
> getting all the fields of the model.
>
> Someone can help me please?
>
> --
> Alex Perez
> alex.pe...@bebabum.com
>
>  *bebabum* be successful
>
> c/ Còrsega 301-303, Àtic 2
> 08008 Barcelonahttp://www.bebabum.comhttp://www.facebook.com/bebabumhttp://twitter.com/bebabum
>
> This message is intended exclusively for its addressee and may contain
> information that is confidential and protected by professional privilege.
> If you are not the intended recipient you are hereby notified that any
> dissemination, copy or disclosure of this communication is strictly
> prohibited by law.
>
> Este mensaje se dirige exclusivamente a su destinatario y puede contener
> información privilegiada o confidencial. Si no es vd. el destinatario
> indicado,
> queda notificado que la utilización, divulgación y/o copia sin autorización
> está prohibida en virtud de la legislación vigente.
>
> Le informamos que los datos personales que facilite/ha facilitado pasarán a
> formar parte de un fichero responsabilidad de bebabum, S.L. y que tiene
> por finalidad gestionar las relaciones con usted.
> Tiene derecho al acceso, rectificación cancelación y oposición en nuestra
> oficina ubicada en c/ Còrsega 301-303, Àtic 2 de Barcelona o a la dirección
> de e-mail l...@bebabum.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment