Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about the name 'meta' #2381

Open
t-persson opened this issue Sep 10, 2020 · 0 comments
Open

Question about the name 'meta' #2381

t-persson opened this issue Sep 10, 2020 · 0 comments

Comments

@t-persson
Copy link

@t-persson t-persson commented Sep 10, 2020

Hello,

In mongoengine the name 'meta' is used to attach metadata to the Document.
I have a problem with this name as all of my documents in MongoDB have this field and I cannot use mongoengine for this reason.

Is there a workaround for this?

Would you accept a breaking change where the meta field is renamed?
class MyDoc(Document): metadata = { "max_documents": 100 }

Now of course renaming the meta name to something else might break it for others.
Would you accept a breaking change where the meta field is replaced with a "Meta" class
class MyDoc(Document): meta = StringField() class Meta: max_documents = 100

While not trivial, the actual change would probably not be that bad to make. I have a test where I could initialize MyDoc with the 'class Meta' style.
If there is support for such a change, I would be happy to make it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.