diff options
Diffstat (limited to 'odb/tracer/source.cxx')
-rw-r--r-- | odb/tracer/source.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/odb/tracer/source.cxx b/odb/tracer/source.cxx index 8412714..5eaa5ad 100644 --- a/odb/tracer/source.cxx +++ b/odb/tracer/source.cxx @@ -67,7 +67,7 @@ namespace tracer << "throw object_not_persistent ();" << "}"; - // erase () + // erase (id_type) // os << "void " << traits << "::" << endl << "erase (database&, const id_type& id)" @@ -79,6 +79,18 @@ namespace tracer << "throw object_not_persistent ();" << "}"; + // erase (object_type) + // + os << "void " << traits << "::" << endl + << "erase (database&, const object_type& obj)" + << "{" + << "std::cout << \"delete \" << type_name () << \" id \" << " << + "obj." << id.name () << " << std::endl;" + << endl + << "if (obj." << id.name () << " == id_type ())" << endl + << "throw object_not_persistent ();" + << "}"; + // find () // os << traits << "::pointer_type" << endl |