Reputation: 75
I want to use a non default database with ManyRelatedManager's set method in django.
I have tried the following methods:
By mentioning the using
method in the query
It gives me the following error:
AttributeError: 'QuerySet' object has no attribute 'set'
By using the db_manager with the relatedmanager like this: modelA.modelB_set.db_manager('new_db').set(modelB_list)
This doesn't give any error, but it uses the default database to do this.
Is there any way that I can use a non default database with set method of ManyRelatedManager? Thanks in advance.
Upvotes: 1
Views: 52