diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-10-27 15:16:49 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-10-27 15:16:49 +0200 |
commit | c9fa9d93a0db446eb8a85d62b106bff5e045ff28 (patch) | |
tree | 37b5f1ad7e814c3002211664a2334fea7d9d4213 /odb/oracle/statement-cache.hxx | |
parent | b2d84383f0bdc81e690e53c700ec8c5fe8cd84e1 (diff) |
Add support for persistent classes without object ids
New pragma id (object). New test: common/no-id.
Diffstat (limited to 'odb/oracle/statement-cache.hxx')
-rw-r--r-- | odb/oracle/statement-cache.hxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/odb/oracle/statement-cache.hxx b/odb/oracle/statement-cache.hxx index 92254b1..7480eb2 100644 --- a/odb/oracle/statement-cache.hxx +++ b/odb/oracle/statement-cache.hxx @@ -38,16 +38,18 @@ namespace odb } template <typename T> - object_statements<T>& + typename object_statements_selector<T>::type& find_object () { + typedef typename object_statements_selector<T>::type object_statements; + map::iterator i (map_.find (&typeid (T))); if (i != map_.end ()) - return static_cast<object_statements<T>&> (*i->second); + return static_cast<object_statements&> (*i->second); - details::shared_ptr<object_statements<T> > p ( - new (details::shared) object_statements<T> (conn_)); + details::shared_ptr<object_statements> p ( + new (details::shared) object_statements (conn_)); map_.insert (map::value_type (&typeid (T), p)); return *p; |