mirror of
https://gitee.com/johng/gf.git
synced 2024-11-29 18:57:44 +08:00
commit
61db7d96b7
@ -22,7 +22,7 @@ func (m *Model) Order(orderBy ...string) *Model {
|
||||
if model.orderBy != "" {
|
||||
model.orderBy += ","
|
||||
}
|
||||
model.orderBy = model.db.GetCore().QuoteString(strings.Join(orderBy, " "))
|
||||
model.orderBy += model.db.GetCore().QuoteString(strings.Join(orderBy, " "))
|
||||
return model
|
||||
}
|
||||
|
||||
|
@ -438,7 +438,7 @@ func Test_Model_Clone(t *testing.T) {
|
||||
defer dropTable(table)
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
md := db.Model(table).Where("id IN(?)", g.Slice{1, 3})
|
||||
md := db.Model(table).Safe(true).Where("id IN(?)", g.Slice{1, 3})
|
||||
count, err := md.Count()
|
||||
t.AssertNil(err)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user