orm: inline struct support
This commit is contained in:
@@ -51,9 +51,9 @@ func (o *insertSet) Insert(md interface{}) (int64, error) {
|
||||
if id > 0 {
|
||||
if o.mi.fields.pk.auto {
|
||||
if o.mi.fields.pk.fieldType&IsPostiveIntegerField > 0 {
|
||||
ind.Field(o.mi.fields.pk.fieldIndex).SetUint(uint64(id))
|
||||
ind.FieldByIndex(o.mi.fields.pk.fieldIndex).SetUint(uint64(id))
|
||||
} else {
|
||||
ind.Field(o.mi.fields.pk.fieldIndex).SetInt(id)
|
||||
ind.FieldByIndex(o.mi.fields.pk.fieldIndex).SetInt(id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user