示例#1
0
func (a *ProjectService) Update(project *models.Project) error {
	revel.INFO.Println("updating project", project.ToString())
	count, err := persistence.Dbm.Update(project)
	checkErr(err, "project not updated "+project.ToString())
	if count == 1 {
		return nil
	}
	return err
}
示例#2
0
func (a *ProjectService) Save(project *models.Project) *models.Project {
	revel.INFO.Println("saving project", project.ToString())
	persistence.Dbm.Insert(project)
	return project
}