feat: fix issues
This commit is contained in:
@@ -85,7 +85,7 @@ func (m *UserPosts) BatchDelete(ctx context.Context, ids []int64) error {
|
||||
func (m *UserPosts) Update(ctx context.Context) error {
|
||||
m.UpdatedAt = time.Now()
|
||||
|
||||
stmt := tblUserPosts.UPDATE(tblUserPostsUpdateMutableColumns).SET(m).WHERE(tblUserPosts.ID.EQ(Int(m.ID))).RETURNING(tblUserPosts.AllColumns)
|
||||
stmt := tblUserPosts.UPDATE(tblUserPostsUpdateMutableColumns).MODEL(m).WHERE(tblUserPosts.ID.EQ(Int(m.ID))).RETURNING(tblUserPosts.AllColumns)
|
||||
m.log().WithField("func", "Update").Info(stmt.DebugSql())
|
||||
|
||||
if err := stmt.QueryContext(ctx, db, m); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user