mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
Remove PersistenceContextScope.NONE for now
This commit is contained in:
1 parent
65cb2ae94d
commit
216806074c
4 files changed
+6
-74
No files matched your search
@@ -198,18 +198,7 @@ public final class OrmQueryRequest<T> extends BeanRequest implements BeanQueryRe
|
||||
|
||||
// determine the scope (from the query and then server)
|
||||
PersistenceContextScope scope = ebeanServer.getPersistenceContextScope(query);
|
||||
switch (scope) {
|
||||
case QUERY:
|
||||
// Create a new PersistenceContext for this query
|
||||
return new DefaultPersistenceContext();
|
||||
case NONE:
|
||||
// Effectively don't use a PersistenceContext
|
||||
return new NoopPersistenceContext();
|
||||
default: {
|
||||
// Use the transaction scoped PersistenceContext
|
||||
return t.getPersistenceContext();
|
||||
}
|
||||
}
|
||||
return (scope == PersistenceContextScope.QUERY) ? new DefaultPersistenceContext() : t.getPersistenceContext();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user