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

add support for EmbeddedModelField #151

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

timgraham
Copy link
Collaborator

@timgraham timgraham commented Oct 4, 2024

Very limited work in progress.

No forms/admin support.
In progress schema change support.
Limited querying support (no field validation, no aggregation support).

fixes #103

@timgraham timgraham force-pushed the embedded-model-field branch from bec8461 to a6479ba Compare October 4, 2024 15:13
@ShaneHarvey
Copy link

Just want to make sure if we're copying code that we attribute it properly according to the django-nonrel license.

@timgraham
Copy link
Collaborator Author

Certainly. THIRD-PARTY-NOTICES could be amended.

Copy link
Collaborator

@Jibola Jibola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, LGTM! Before merge, I'd love to go over the commented pieces again, but thank you for transferring the tests. I think they covered all the cases we'd be curious about as well.

django_mongodb/fields/embedded_model.py Outdated Show resolved Hide resolved
django_mongodb/fields/embedded_model.py Outdated Show resolved Hide resolved
tests/mongo_fields/models.py Outdated Show resolved Hide resolved
tests/mongo_fields/test_embedded_model.py Outdated Show resolved Hide resolved
tests/mongo_fields/test_embedded_model.py Outdated Show resolved Hide resolved
tests/mongo_fields/test_listfield.py Outdated Show resolved Hide resolved
tests/mongo_fields/test_listfield.py Outdated Show resolved Hide resolved
@timgraham
Copy link
Collaborator Author

This is not at all ready for review.

@timgraham timgraham force-pushed the embedded-model-field branch from 6019a25 to df74d7b Compare November 4, 2024 23:19
@timgraham timgraham changed the title add support for ListField and EmbeddedModelField add support for EmbeddedModelField Nov 4, 2024
@timgraham timgraham force-pushed the embedded-model-field branch from df74d7b to a52ad67 Compare November 9, 2024 00:52
@timgraham timgraham force-pushed the embedded-model-field branch 3 times, most recently from 0db42ed to 09c1d69 Compare November 22, 2024 20:11
return mql, key_transforms


def key_transform(self, compiler, connection):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should move this function into the KeyTransform as as_mql

@timgraham timgraham force-pushed the embedded-model-field branch from 6f44d29 to da58861 Compare November 26, 2024 03:01
@timgraham timgraham force-pushed the embedded-model-field branch from e2947b8 to dd65bb7 Compare December 13, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PYTHON-4625: add support for EmbeddedModelField
4 participants