Left off at adding album record to the database and retrieving the album record to assign the album id to the song record's album id foreign key
This commit is contained in:
@@ -1,5 +1,19 @@
|
||||
#include "managers/albumManager.h"
|
||||
|
||||
#include "database/albumRepository.h"
|
||||
#include "models/models.h"
|
||||
|
||||
Manager::albumManager::albumManager(const Model::BinaryPath& bConf)
|
||||
: m_bConf(bConf)
|
||||
{ }
|
||||
|
||||
|
||||
void Manager::albumManager::saveAlbum(const Model::Song& song)
|
||||
{
|
||||
Model::Album album;
|
||||
album.title = song.album;
|
||||
album.year = song.year;
|
||||
|
||||
Database::albumRepository albRepo(m_bConf);
|
||||
albRepo.saveAlbum(album);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user