diff --git a/cloudfirestore/helper.go b/cloudfirestore/helper.go index a8bff3e..6da4a01 100644 --- a/cloudfirestore/helper.go +++ b/cloudfirestore/helper.go @@ -123,6 +123,7 @@ func GetMulti(ctx context.Context, client *firestore.Client, docRefs []*firestor // GetByQuery ... クエリで単体取得する(tx対応) func GetByQuery(ctx context.Context, query firestore.Query, dst interface{}) (bool, error) { + query = query.Limit(1) var it *firestore.DocumentIterator if tx := getContextTransaction(ctx); tx != nil { it = tx.Documents(query)