mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: use empty slice instead of nil in sqlAll (#310)
This commit is contained in:
@@ -18,7 +18,7 @@ in the LICENSE file in the root directory of this source tree.
|
||||
|
||||
func ({{ $receiver }} *{{ $builder }}) sqlAll(ctx context.Context) ([]*{{ $.Name }}, error) {
|
||||
var (
|
||||
nodes []*{{ $.Name }}
|
||||
nodes []*{{ $.Name }} = []*{{ $.Name }}{}
|
||||
{{- with $.ForeignKeys }}
|
||||
withFKs = {{ $receiver }}.withFKs
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user