mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
WIP update/refactoring on caching
This commit is contained in:
1 parent
2dccb818a2
commit
4c4e084e43
25 files changed
+728
-460
No files matched your search
@@ -118,7 +118,7 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> {
|
||||
|
||||
public void cacheClear() {
|
||||
if (targetDescriptor.isBeanCaching() && relationshipProperty != null) {
|
||||
targetDescriptor.cacheClearCachedManyIds(relationshipProperty.getName());
|
||||
targetDescriptor.cacheManyPropClear(relationshipProperty.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,12 +128,12 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> {
|
||||
if (assocBean != null) {
|
||||
Object parentId = targetDescriptor.getId((EntityBean)assocBean);
|
||||
if (parentId != null) {
|
||||
targetDescriptor.cacheRemoveCachedManyIds(parentId, relationshipProperty.getName());
|
||||
targetDescriptor.cacheManyPropRemove(parentId, relationshipProperty.getName());
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (clearOnNull) {
|
||||
targetDescriptor.cacheClearCachedManyIds(relationshipProperty.getName());
|
||||
targetDescriptor.cacheManyPropClear(relationshipProperty.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user