Ability to create indexes from Meta class implementation
RamiAwar opened this issue ยท 0 comments
RamiAwar commented
๐ Feature Request
Add indexes to internal metadata class to enable easy index creation.
class UserRepository(BaseRepository): class Meta: model = User collection = "user" indexes = [ { fields: ["username"], unique: True } ]
๐ Motivation
Being a PyMongo wrapper, this is a deal-breaker for anyone who needs to use Mongomantic in production.
๐ฐ Alternatives
Use PyMongo, but if Mongomantic was good then users shouldn't have to.