func (a Album) FindAlbumPhotos(albumId int) []Photo { var album Album var photos []Photo conn := db.GetConnection() conn.Debug().First(&album, albumId) conn.Debug().Model(&album).Related(&photos) return photos }
func (a Article) FindOne(id int) Article { article := Article{} conn := db.GetConnection() conn.Debug().First(&article, id) return article }
func (a Album) FindOne(id int) Album { album := Album{} conn := db.GetConnection() conn.Debug().First(&album, id) return album }
func (g Game) FindOne(id int) Game { game := Game{} conn := db.GetConnection() conn.Debug().First(&game, id) return game }