doableware / djongo

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

EmbeddedField - TypeError: Abstract models cannot be instantiated. #606

Open dusan91judo opened 2 years ago

dusan91judo commented 2 years ago

Hi, there is still an issue for Embedded fields. Is there any way that this is going to be fixed ?

My requirements.txt

Django==4.0.1 djangorestframework==3.12.2 djongo==1.3.6 pymongo==3.12.1 pytz==2021.3

class CommercialProjectDocument(models.Model):
    tax = models.ArrayField(model_container=Tax, null=True, help_text='taxes')

    class Meta:
        abstract = True

class Project(models.Model):
     _id = models.ObjectIdField(help_text='Unique identifier')
     document = models.EmbeddedField(model_container=CommercialProjectDocument, null=True, default=None)

When I'm trying to query and serialize project I'm getting issue about abstract = True property. Does this library is no longer maintained, since this is well known issue for long time ?

DominicLGit commented 2 years ago

Djongo only works with django up to 3.1

thascius-rumpelschnick commented 2 years ago

Unfortunately this issue still seems to exist (Django version 4.0.1 and 4.0.5).

jrgrez commented 2 years ago

@nesdis when this version will be available in pypi?

kurkurzz commented 1 year ago

I have this problem with django==4.1.8 and djongo==1.3.6. Is the fix or workaround available?