fix exists() finisher

This commit is contained in:
Alex Grintsvayg 2017-07-20 10:50:55 -04:00
parent 05c7f7d06a
commit 9c8262b702

View file

@ -105,6 +105,7 @@ func (q {{$tableNameSingular}}Query) Exists() (bool, error) {
var count int64
queries.SetCount(q.Query)
queries.SetSelect(q.Query, []string{})
queries.SetLimit(q.Query, 1)
err := q.Query.QueryRow().Scan(&count)