Correctly build updaters with New
Otherwise we have nil columns
This commit is contained in:
parent
7da653efc6
commit
24a3610c4c
6 changed files with 29 additions and 7 deletions
|
|
@ -13,9 +13,16 @@ import (
|
|||
|
||||
type ComplianceUpdater = db.Updater[table.ComplianceTable, model.Compliance]
|
||||
|
||||
func NewComplianceUpdater() ComplianceUpdater {
|
||||
return db.NewUpdater[table.ComplianceTable, model.Compliance](
|
||||
table.Compliance,
|
||||
table.Compliance.ReportID,
|
||||
)
|
||||
}
|
||||
|
||||
func NewUpdaterCompliance() db.Updater[table.ComplianceTable, model.Compliance] {
|
||||
return db.NewUpdater[table.ComplianceTable, model.Compliance](
|
||||
*table.Compliance,
|
||||
table.Compliance,
|
||||
table.Compliance.ReportID,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue