Cascade changes in Mongodb in Django
Is there a way to change a element of collection in Mongoose and be
cascade changed in other collection that points this element, similar to
using MySQLs foreign keys?
For example, in MySQL I'd assign a foreign key and set it to cascade on
change or delete. Thus, if I were to delete or change name of a
activity_Type, all applications and associated activity_Types would be
removed or affected as well.
class ValuesHelper(object):
NAME = 'activityType'
def __init__(self, neo_on=False):
self.client =
MongoClient(settings.DATABASES['mongo']['HOST'],settings.DATABASES['mongo']['PORT'])
self.db = self.client[settings.DATABASES['mongo']['NAME']]
No comments:
Post a Comment