diff options
Diffstat (limited to 'common/typeindex.cpp')
-rw-r--r-- | common/typeindex.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/typeindex.cpp b/common/typeindex.cpp index 077bfa1..a65c676 100644 --- a/common/typeindex.cpp +++ b/common/typeindex.cpp | |||
@@ -103,6 +103,12 @@ void TypeIndex::addProperty<QDateTime>(const QByteArray &property) | |||
103 | } | 103 | } |
104 | 104 | ||
105 | template <> | 105 | template <> |
106 | void TypeIndex::addProperty<ApplicationDomain::Reference>(const QByteArray &property) | ||
107 | { | ||
108 | addProperty<QByteArray>(property); | ||
109 | } | ||
110 | |||
111 | template <> | ||
106 | void TypeIndex::addPropertyWithSorting<QByteArray, QDateTime>(const QByteArray &property, const QByteArray &sortProperty) | 112 | void TypeIndex::addPropertyWithSorting<QByteArray, QDateTime>(const QByteArray &property, const QByteArray &sortProperty) |
107 | { | 113 | { |
108 | auto indexer = [=](const QByteArray &identifier, const QVariant &value, const QVariant &sortValue, Sink::Storage::DataStore::Transaction &transaction) { | 114 | auto indexer = [=](const QByteArray &identifier, const QVariant &value, const QVariant &sortValue, Sink::Storage::DataStore::Transaction &transaction) { |
@@ -114,8 +120,15 @@ void TypeIndex::addPropertyWithSorting<QByteArray, QDateTime>(const QByteArray & | |||
114 | mSortedProperties.insert(property, sortProperty); | 120 | mSortedProperties.insert(property, sortProperty); |
115 | } | 121 | } |
116 | 122 | ||
123 | template <> | ||
124 | void TypeIndex::addPropertyWithSorting<ApplicationDomain::Reference, QDateTime>(const QByteArray &property, const QByteArray &sortProperty) | ||
125 | { | ||
126 | addPropertyWithSorting<QByteArray, QDateTime>(property, sortProperty); | ||
127 | } | ||
128 | |||
117 | void TypeIndex::add(const QByteArray &identifier, const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Storage::DataStore::Transaction &transaction) | 129 | void TypeIndex::add(const QByteArray &identifier, const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Storage::DataStore::Transaction &transaction) |
118 | { | 130 | { |
131 | SinkTrace() << "add " << identifier; | ||
119 | for (const auto &property : mProperties) { | 132 | for (const auto &property : mProperties) { |
120 | const auto value = entity.getProperty(property); | 133 | const auto value = entity.getProperty(property); |
121 | auto indexer = mIndexer.value(property); | 134 | auto indexer = mIndexer.value(property); |