mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
Summary:
While trying out this project I think I found a bug in the generated code when using an optional and nillable time field.
```
vet: ent/user.go:46:16: cannot use &vu.DeletedAt (value of type *sql.NullTime) as *time.Time value in assignment
```
7438104b5d made a change to the `{{ $scan }}` struct, which now always uses `{{ $f.NullType }}` as type, so the `$f.IsTime` check can now be removed. This pull request does that.
This is my fist contribution here. I hope I didn't miss anything.
Pull Request resolved: https://github.com/facebookincubator/ent/pull/60
Differential Revision: D17760925
Pulled By: a8m
fbshipit-source-id: 675005be62487b1b9eb77302b8185bd3b6ef0195
entc integration tests
Regenerating new templates
If you edited one of the files in entc/gen/template or entc/load/template,
run the following command to from entc directory:
go generate ./...
Running the integration tests
docker-compose -f compose/docker-compose.yaml up -d --scale test=0
go test
Use the -run flag for running specific test or set of tests. For example:
go test -run=MySQL
go test -run=SQLite/Sanity