Anybody know what is the "Relation" from this error?

8 views
Skip to first unread message

Wildmental

unread,
Mar 27, 2021, 12:38:15 PM3/27/21
to Django users
Running a Model.objects.raw() method with a pre-made query from
the DBA of my company, I was keep facing below error.
<database error - Programming Error : relation does not exist.>
Even though I have the correctly named table in my database!

Does the 'relation' in this error indicate other than the table in connected DB?

The output of raw query I used is correctly matching to the Model field.
(It uses several union all command referencing the tables which are not defined as django model though.)

Currently I just gave up using raw query of joining many tables 
as a base of Django model data though. 
I found a possible substitution for that is cursor.callproc() calling same data as DB function, but still cannot use it as a base data for Django model.

Please help.
Thanks.
Reply all
Reply to author
Forward
0 new messages