moved session to namespace query and move basic_schema::initialize to session constructor
This commit is contained in:
@@ -4,10 +4,13 @@
|
||||
|
||||
#include "connection.hpp"
|
||||
|
||||
#include "matador/query/session.hpp"
|
||||
|
||||
#include "models/author.hpp"
|
||||
#include "models/book.hpp"
|
||||
|
||||
using namespace matador;
|
||||
using namespace matador::query;
|
||||
using namespace matador::object;
|
||||
using namespace matador::test;
|
||||
|
||||
@@ -58,8 +61,7 @@ TEST_CASE_METHOD(SessionFixture, "Test insert object with has many relation", "[
|
||||
.and_then([this] { return schema.create(db); } );
|
||||
REQUIRE(result.is_ok());
|
||||
|
||||
orm::session ses({bus, connection::dns, 4}, schema);
|
||||
schema.initialize(ses);
|
||||
session ses({bus, connection::dns, 4}, schema);
|
||||
|
||||
auto s_king = make_object<author>(1, "Steven", "King", "21.9.1947", 1956, false);
|
||||
|
||||
@@ -79,8 +81,7 @@ TEST_CASE_METHOD(SessionFixture, "Test insert object with has many relation with
|
||||
.and_then([this] { return schema.create(db); } );
|
||||
REQUIRE(result.is_ok());
|
||||
|
||||
orm::session ses({bus, connection::dns, 4}, schema);
|
||||
schema.initialize(ses);
|
||||
session ses({bus, connection::dns, 4}, schema);
|
||||
|
||||
auto s_king = make_object<author_identity>("Steven King");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user