art049 / art049/odmantic

EmbeddedModel indexes

Open
#290 1 comment 0 reactions 0 assignees View on GitHub
documentation
Dominant language
Python
Stars
1.2k
Forks
97
PR merge metrics
No merged PRs in 30d

Description

Indexes is not created when using embedded models, e.g:
```python

class User(EmbeddedModel):
name: str = Field(index=True)
. . .

class Product(Model):
owner: User
. . .
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the embedded-model example and inspect the code path that builds MongoDB indexes for models and embedded fields. Confirm how indexes are collected, then verify that an index declared on User.name is created when User is embedded in Product.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, python
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.