mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: skip Table() predicate and warn about reserved schema name (Client) (#2486)
* entc/gen: do no generate `Table()` predicate and warn the user in case of reserved schema name like `Client`. * doc/md: document reserved schema name * doc/md: revert reserved schema name as this was already working * doc/md: rephrase
This commit is contained in:
@@ -58,6 +58,12 @@ the root directory of your project, and can be generated by `entc` as follows:
|
||||
go run entgo.io/ent/cmd/ent init User Group
|
||||
```
|
||||
|
||||
:::note
|
||||
Please note, that some schema names (like `Client`) are not available due to
|
||||
[internal use](https://pkg.go.dev/entgo.io/ent/entc/gen#ValidSchemaName). You can circumvent reserved names by using an
|
||||
annotation as mentioned [here](schema-annotations.md#custom-table-name).
|
||||
:::
|
||||
|
||||
## It's Just Another ORM
|
||||
|
||||
If you are used to the definition of relations over edges, that's fine.
|
||||
|
||||
Reference in New Issue
Block a user