WIP: Insert sets PK
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user