entc/gen: move schemaconfig template to feature-flag

This commit is contained in:
Ariel Mashraki
2021-01-20 12:29:46 +02:00
committed by Ariel Mashraki
parent 0e7823383e
commit aeb1ccc571
75 changed files with 10705 additions and 151 deletions

View File

@@ -16,7 +16,8 @@ func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
if err != nil {
return nil, fmt.Errorf("ent: starting a transaction: %v", err)
}
cfg := config{driver: &txDriver{tx: tx, drv: c.driver}, log: c.log, debug: c.debug, hooks: c.hooks}
cfg := c.config
cfg.driver = &txDriver{tx: tx, drv: c.driver}
return &Tx{
config: cfg,
{{ range $_, $n := $.Nodes -}}