WIP: Insert sets PK

This commit is contained in:
2026-05-23 20:19:25 +02:00
parent 890151b490
commit 5d892a15ef
6 changed files with 59 additions and 54 deletions
+1 -2
View File
@@ -12,7 +12,6 @@ import (
type HasPK interface {
IsInsertable() bool
SetPk(pks ...any)
}
type Repository[T HasPK] struct {
@@ -103,7 +102,7 @@ func (r *Repository[T]) Save(entity T) (*T, error) {
log.LogError("Insert failed for entity: %s", entity)
}
return nil, errors.New("")
return &entity, nil
}
updateExec, err := exec.NewUpdate[T](r.orm, entity)