Saturday, June 30, 2012

Re: advantages and disadvantages of Raw sql queries in django

On 30/06/2012 10:58 μμ, Javier Guerra Giraldez wrote:
>
> Even when using the ORM, any complex query is a good candidate to be
> encapsulated as part of the model. Ideally, the model should expose a
> high level view of your data objects, not simply an easy to use view
> of the database.
>
>

Interesting idea, I haven't used that yet, could you give an example of
that?
Would you use a method calling the ORM that would include something like
self.objects.select_related().bla bla?

Thanks

--
--------------------------------------------------------------
Nick Apostolakis
e-mail: nickapos@oncrete.gr
Web Site: http://nick.oncrete.gr
--------------------------------------------------------------


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

No comments:

Post a Comment