[odb-users] Issue using Object Loading Views
Nicholas Cremonesi
nicholas.cremonesi at gmail.com
Tue Mar 17 07:53:33 EDT 2015
Hello,
I have an issue using Object Loading Views. This is my piece of code:
= BEGIN ==
int test(auto_ptr<database> db)
{
typedef odb::query<test_view> query;
typedef odb::result<test_view> result;
{
session s;
transaction t (db->begin ());
result r (db->query<test_view> (
(query::T_AREA::AREA == "NNAP")
));
for (result::iterator i (r.begin ()); i != r.end (); ++i)
{
cout << " " << i->tt_area->ANAM() << endl;
}
t.commit ();
}
return 0;
}
== END ==
When I execute the above code it returns to me only one result, and then I
receive this error: "Error in `./main': double free or corruption
(fasttop): 0x00000000007b5760"
Any idea?
Many thanks!
More information about the odb-users
mailing list