|
@@ -72,7 +72,7 @@ func (e Entities) Less(i, j int) bool {
|
|
|
}
|
|
|
|
|
|
func (e Entities) Swap(i, j int) {
|
|
|
- e[i], e[j] = e[j], e[j]
|
|
|
+ e[i], e[j] = e[j], e[i]
|
|
|
}
|
|
|
|
|
|
func (e *Entity) ID() string {
|
|
@@ -788,8 +788,9 @@ func (e *Entity) actionMapping(ctx *http.Context) (err error) {
|
|
|
return ctx.Success(e.getMappingValue(namespace))
|
|
|
}
|
|
|
|
|
|
-func newEntity(model Model, opts *Options) *Entity {
|
|
|
+func newEntity(index int32, model Model, opts *Options) *Entity {
|
|
|
entity := &Entity{
|
|
|
+ index: index,
|
|
|
model: model,
|
|
|
opts: opts,
|
|
|
createdAt: time.Now(),
|