Find table name after binding facets. Revert duplicate null check.
This commit is contained in:
parent
b1e333009c
commit
ef455ac032
1 changed files with 2 additions and 4 deletions
|
@ -285,7 +285,6 @@ public class HelenusSession extends AbstractSessionOperations implements Closeab
|
||||||
pojo instanceof MapExportable ? ((MapExportable) pojo).toMap() : null;
|
pojo instanceof MapExportable ? ((MapExportable) pojo).toMap() : null;
|
||||||
if (entity.isCacheable()) {
|
if (entity.isCacheable()) {
|
||||||
List<Facet> boundFacets = new ArrayList<>();
|
List<Facet> boundFacets = new ArrayList<>();
|
||||||
String tableName = CacheUtil.schemaName(boundFacets);
|
|
||||||
for (Facet facet : entity.getFacets()) {
|
for (Facet facet : entity.getFacets()) {
|
||||||
if (facet instanceof UnboundFacet) {
|
if (facet instanceof UnboundFacet) {
|
||||||
UnboundFacet unboundFacet = (UnboundFacet) facet;
|
UnboundFacet unboundFacet = (UnboundFacet) facet;
|
||||||
|
@ -313,6 +312,7 @@ public class HelenusSession extends AbstractSessionOperations implements Closeab
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<String[]> facetCombinations = CacheUtil.flattenFacets(boundFacets);
|
List<String[]> facetCombinations = CacheUtil.flattenFacets(boundFacets);
|
||||||
|
String tableName = CacheUtil.schemaName(boundFacets);
|
||||||
replaceCachedFacetValues(pojo, tableName, facetCombinations);
|
replaceCachedFacetValues(pojo, tableName, facetCombinations);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -345,9 +345,7 @@ public class HelenusSession extends AbstractSessionOperations implements Closeab
|
||||||
if (pojo == null || pojo == HelenusSession.deleted) {
|
if (pojo == null || pojo == HelenusSession.deleted) {
|
||||||
cache.remove(cacheKey);
|
cache.remove(cacheKey);
|
||||||
} else {
|
} else {
|
||||||
if (pojo != null) {
|
cache.put(cacheKey, pojo);
|
||||||
cache.put(cacheKey, pojo);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue