Fixes on Table Name on insert

This commit is contained in:
Hein
2025-11-20 11:49:07 +02:00
parent 640582d508
commit 3d5334002d
2 changed files with 12 additions and 1 deletions

View File

@@ -319,6 +319,10 @@ func (b *BunInsertQuery) Model(model interface{}) common.InsertQuery {
}
func (b *BunInsertQuery) Table(table string) common.InsertQuery {
if b.hasModel {
// If model is set, do not override table name
return b
}
b.query = b.query.Table(table)
return b
}