diff options
Diffstat (limited to 'modules/database/db_sql_live.cpp')
-rw-r--r-- | modules/database/db_sql_live.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/database/db_sql_live.cpp b/modules/database/db_sql_live.cpp index afd884913..9389e5a59 100644 --- a/modules/database/db_sql_live.cpp +++ b/modules/database/db_sql_live.cpp @@ -93,18 +93,18 @@ public: { if (obj && this->SQL) { + Serialize::Type *s_type = obj->GetSerializableType(); + if (!s_type) + continue; + Data data; - obj->Serialize(data); + s_type->Serialize(obj, data); if (obj->IsCached(data)) continue; obj->UpdateCache(data); - Serialize::Type *s_type = obj->GetSerializableType(); - if (!s_type) - continue; - auto create = this->SQL->CreateTable(GetTableName(s_type), data); for (const auto &query : create) this->RunQuery(query); @@ -232,7 +232,7 @@ public: */ Data data2; - new_s->Serialize(data2); + obj->Serialize(new_s, data2); new_s->UpdateCache(data2); /* We know this is the most up to date copy */ } } |