On Fri, Mar 7, 2014 at 3:31 PM, bikeridercz <r...@atlas.cz> wrote:
> Dear colleagues,
>
> I'm trying to do a direct select do database other than the default one. But
> it fails with error.
>
> Note 1: "ASSETS.objects.using('vodb').filter(...)" works fine
> Note 2: the select is little tricky and unfortunately cannot be replaced by
> a database view, because I have no access to database. This is the reason
> why I need the "raw" feature
>
> Example (select is simpified):
> assets = ASSETS.objects.using('vodb').raw('select a.msisdn from ASSET a
> where a.subscription_id_unique = %s', [msisdn])
>
> Error: 'QuerySet' object has no attribute 'raw'
>
> DJango version: 1.6.2

Foo.objects.raw(…).using(…)

Cheers

Tom

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1%2BgtzSuhJNQANrcUVqEH4Cx0T_2wjGew9rHkA%2BgZ9Cm%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to