[Database] Remove orphaned objects. Added helpers to access releases and artists

This commit is contained in:
emeric
2015-08-03 12:56:23 +02:00
parent c1a4451fbd
commit 672aee9347
7 changed files with 64 additions and 24 deletions
+4 -1
View File
@@ -29,8 +29,9 @@ namespace Database
{
class Track;
class Release;
class Release
class Release : public Wt::Dbo::Dbo<Release>
{
public:
@@ -64,6 +65,8 @@ class Release
std::string getMBID() const { return _MBID; }
bool isNone(void) const;
boost::posix_time::time_duration getDuration(void) const;
std::vector<Wt::Dbo::ptr<Artist> > getArtists(); // Get the artists of this release
std::vector<Wt::Dbo::ptr<Track> > getTracks(); // Get the tracks of this release
void setMBID(std::string mbid) { _MBID = mbid; }