diff --git a/bin/templates/pkg/db/crud/crud.go_ b/bin/templates/pkg/db/crud/crud.go_ index 1ad41a7..93bff59 100644 --- a/bin/templates/pkg/db/crud/crud.go_ +++ b/bin/templates/pkg/db/crud/crud.go_ @@ -49,7 +49,7 @@ func (crud Crud_DB) Read_ctx(ctx context.Context, m *lawsuit_status_types.Lawsui tx := db.First(m, id) err = tx.Error if err != nil { - err = fmt.Errorf("Read() id: %v, error: %v", m.id, err) + err = fmt.Errorf("Read() id: %v, error: %v", m.ID, err) } return err @@ -196,7 +196,7 @@ func (crud Crud_DB) create_update_ctx(ctx context.Context, m *lawsuit_status_typ return err } if err != nil { - err = fmt.Errorf("Create_update() id: %v, error: %v", m.id, err) + err = fmt.Errorf("Create_update() id: %v, error: %v", m.ID, err) } return err @@ -235,7 +235,7 @@ func (crud Crud_DB) Delete_ctx(ctx context.Context, m *lawsuit_status_types.Laws err = crud.Save_ctx(ctx, &m2) if err != nil { - err = fmt.Errorf("Delete() id: %v, error: %v", m.id, err) + err = fmt.Errorf("Delete() id: %v, error: %v", m.ID, err) } return err @@ -274,7 +274,7 @@ func (crud Crud_DB) Restore_ctx(ctx context.Context, m *lawsuit_status_types.Law err = crud.Save_ctx(ctx, &m2) if err != nil { - err = fmt.Errorf("Restore() id: %v, error: %v", m.id, err) + err = fmt.Errorf("Restore() id: %v, error: %v", m.ID, err) } return err @@ -319,7 +319,7 @@ func (crud Crud_DB) Find_ByExtID_ctx(ctx context.Context, m *lawsuit_status_type tx := db.Where("ext_id = ?", m.ExtID).Where("connection_id = ?", m.ConnectionID).First(m) err = tx.Error if err != nil { - err = fmt.Errorf("Find_ByExtID() id: %v, error: %v", m.id, err) + err = fmt.Errorf("Find_ByExtID() id: %v, error: %v", m.ID, err) } return err diff --git a/examples/rapira/templates_main/pkg/db/crud/crud.go_ b/examples/rapira/templates_main/pkg/db/crud/crud.go_ index 546d636..232875f 100644 --- a/examples/rapira/templates_main/pkg/db/crud/crud.go_ +++ b/examples/rapira/templates_main/pkg/db/crud/crud.go_ @@ -196,7 +196,7 @@ func (crud Crud_DB) create_update_ctx(ctx context.Context, m *lawsuit_status_typ return err } if err != nil { - err = fmt.Errorf("Create_Update() id: %v, error: %v", m.id, err) + err = fmt.Errorf("Create_Update() id: %v, error: %v", m.ID, err) } return err @@ -235,7 +235,7 @@ func (crud Crud_DB) Delete_ctx(ctx context.Context, m *lawsuit_status_types.Laws err = crud.Save_ctx(ctx, &m2) if err != nil { - err = fmt.Errorf("Delete() id: %v, error: %v", m.id, err) + err = fmt.Errorf("Delete() id: %v, error: %v", m.ID, err) } return err @@ -274,7 +274,7 @@ func (crud Crud_DB) Restore_ctx(ctx context.Context, m *lawsuit_status_types.Law err = crud.Save_ctx(ctx, &m2) if err != nil { - err = fmt.Errorf("Restore() id: %v, error: %v", m.id, err) + err = fmt.Errorf("Restore() id: %v, error: %v", m.ID, err) } return err @@ -319,7 +319,7 @@ func (crud Crud_DB) Find_ByExtID_ctx(ctx context.Context, m *lawsuit_status_type tx := db.Where("ext_id = ?", m.ExtID).Where("connection_id = ?", m.ConnectionID).First(m) err = tx.Error if err != nil { - err = fmt.Errorf("Find_ByExtID() id: %v, error: %v", m.id, err) + err = fmt.Errorf("Find_ByExtID() id: %v, error: %v", m.ID, err) } return err