mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
#347 - @History support with query.asOf(Timestamp)
This commit is contained in:
1 parent
3cafb37a73
commit
82489636d5
37 files changed
+601
-92
No files matched your search
@@ -49,6 +49,7 @@ public class DLoadBeanContext extends DLoadBaseContext implements LoadBeanContex
|
||||
if (parent.isReadOnly() != null) {
|
||||
query.setReadOnly(parent.isReadOnly());
|
||||
}
|
||||
query.asOf(parent.getAsOf());
|
||||
query.setParentNode(objectGraphNode);
|
||||
query.setLazyLoadProperty(lazyLoadProperty);
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.avaje.ebeaninternal.server.deploy.BeanPropertyAssocMany;
|
||||
import com.avaje.ebeaninternal.server.el.ElPropertyValue;
|
||||
import com.avaje.ebeaninternal.server.querydefn.OrmQueryProperties;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -30,7 +31,8 @@ public class DLoadContext implements LoadContext {
|
||||
private final Map<String, DLoadManyContext> manyMap = new HashMap<String, DLoadManyContext>();
|
||||
|
||||
private final DLoadBeanContext rootBeanContext;
|
||||
|
||||
|
||||
private final Timestamp asOf;
|
||||
private final Boolean readOnly;
|
||||
private final boolean excludeBeanCache;
|
||||
private final int defaultBatchSize;
|
||||
@@ -56,6 +58,7 @@ public class DLoadContext implements LoadContext {
|
||||
this.rootDescriptor = request.getBeanDescriptor();
|
||||
|
||||
SpiQuery<?> query = request.getQuery();
|
||||
this.asOf = query.getAsOf();
|
||||
this.readOnly = query.isReadOnly();
|
||||
this.excludeBeanCache = Boolean.FALSE.equals(query.isUseBeanCache());
|
||||
this.useAutofetchManager = query.getAutoFetchManager() != null;
|
||||
@@ -211,8 +214,12 @@ public class DLoadContext implements LoadContext {
|
||||
protected Boolean isReadOnly() {
|
||||
return readOnly;
|
||||
}
|
||||
|
||||
public PersistenceContext getPersistenceContext() {
|
||||
|
||||
protected Timestamp getAsOf() {
|
||||
return asOf;
|
||||
}
|
||||
|
||||
public PersistenceContext getPersistenceContext() {
|
||||
return persistenceContext;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,8 @@ public class DLoadManyContext extends DLoadBaseContext implements LoadManyContex
|
||||
if (parent.isReadOnly() != null){
|
||||
query.setReadOnly(parent.isReadOnly());
|
||||
}
|
||||
|
||||
query.asOf(parent.getAsOf());
|
||||
query.setParentNode(objectGraphNode);
|
||||
|
||||
if (queryProps != null){
|
||||
|
||||
Reference in new issue
Block a user