New import path 🎊
Package path was changed from github.com/facebook/ent
to entgo.io/ent
.
Please use the following command (on Mac) to replace imports:
For github.com/facebookincubator/ent-contrib
:
find . -type f -name '*.go' -exec sed -i '' 's/github.com\/facebookincubator\/ent-contrib/entgo.io\/contrib/g' {} +
For github.com/facebook/ent
:
find . -type f -name '*.go' -exec sed -i '' 's/github.com\/facebook/entgo.io/g' {} +
schema/fields
- Add
DefaultFunc
option for fields (#1153)
entc/gen
-
Add support for alternate schema/database names (Thanks @marwan-at-work). Read more here
-
Add
field.Comment
support in generated assets (Thanks @kerbelp) -
Breaking change: add the edge-name as the default json tag for edge fields (#1204):
- Users []*User + Users []*User `json:"users,omitempty"`
dialect/sql/schema
- Add support for migration hooks/middleware (Thanks @rubensayshi)
dialect/sql/sqlgraph
- Apply predicate on update-node
Besides these, there are multiple bug fixes and small perf improvements in this release.