Open JiawenFan810 opened 2 years ago
This issue has been automatically marked as stale because it has been open 360 days with no activity. Remove stale label or comment or this will be closed in 180 days
@jinzhu any insight on this?
Is there any progress on this issue?
Your Question
BaseModel
is used in many other models as well. What can I do if I want to use composite index for User.DeletedAt and User.Name? The only solution I came about is not to useBaseModel
embedded and use the following directly.Is there a way to add the composite index to
User
as well as using the embeddedBaseModel
? I tried to usedb.Migrator().CreateIndex()
, but found thatCreateIndex()
method also needs the gorm tag in the model.Thank you!