diff --git a/session_get_test.go b/session_get_test.go index 0679b7ab5..3af4395f9 100644 --- a/session_get_test.go +++ b/session_get_test.go @@ -47,6 +47,12 @@ func TestGetVar(t *testing.T) { assert.Equal(t, true, has) assert.Equal(t, 28, age) + var ageMax int + has, err = testEngine.SQL("SELECT max(age) FROM "+testEngine.TableName("get_var", true)+" WHERE `id` = ?", data.Id).Get(&ageMax) + assert.NoError(t, err) + assert.Equal(t, true, has) + assert.Equal(t, 28, ageMax) + var age2 int64 has, err = testEngine.Table("get_var").Cols("age"). Where("age > ?", 20).