mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-03 16:25:36 +00:00
#1816 Fix for OneToMany relation to non-cached target bean.
This commit is contained in:
1 parent
3495d03706
commit
d2ece76ca8
5 files changed
+13
-5
No files matched your search
@@ -226,6 +226,7 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> implements ST
|
||||
desc.registerTable(targetDescriptor.getBaseTable(), this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the underlying collection of beans.
|
||||
*/
|
||||
@@ -345,7 +346,7 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> implements ST
|
||||
|
||||
/**
|
||||
* Add the loaded current bean to its associated parent.
|
||||
*
|
||||
* <p>
|
||||
* Helper method used by Elastic integration when loading with a persistence context.
|
||||
*/
|
||||
@Override
|
||||
@@ -967,6 +968,13 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> implements ST
|
||||
elementDescriptor.jsonWriteElement(ctx, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* Only cache Many Ids if the target bean is also cached.
|
||||
*/
|
||||
public boolean isUseCache() {
|
||||
return targetDescriptor.isBeanCaching();
|
||||
}
|
||||
|
||||
/**
|
||||
* A Many (element collection) property in bean cache to held as JSON.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user