func (r *AccountRepository) Save(account *core.Account) error { result, err := dat.Create(r, account) if err != nil { log.Printf("Error creating new account: %s", err) } account.SetID(result.GeneratedKeys[0]) return err }
func (r *TopicRepository) Save(topic *core.Topic) error { result, err := dat.Create(r, topic) if err != nil { log.Printf("Error creating new topic: %s", err) return err } topic.SetID(result.GeneratedKeys[0]) return nil }
func (r *PostRepository) Save(post *core.Post) error { result, err := dat.Create(r, post) if err != nil { log.Printf("Error creating new post: %s", err) return err } post.SetID(result.GeneratedKeys[0]) return nil }