Saturday, March 27, 2021

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

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.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3807bf82-e79b-4034-a180-72c26d9db824n%40googlegroups.com.

No comments:

Post a Comment