doableware / djongo

Django and MongoDB database connector
https://www.djongomapper.com
GNU Affero General Public License v3.0
1.88k stars 355 forks source link

ArrayReferenceField to self #646

Closed MiltosD closed 1 year ago

MiltosD commented 1 year ago

This actually a question whether it is possible to refer to the same model. I tried using 'self' but did not work.

Python script

```python class Person(models.Model): # other fields .... parents = models.ArrayReferenceField( to='self', # No errors but nothing happens in the DB ) ```