ConformResultsInUnitOfWork |
|
| Your trail: |
Difference between
version 17
and
version 13:
| Line 11 was replaced by line 11 |
| - ''Session properties can be used as an alternative to using a conforming query -- see FindingNewObjects.'' |
| + ''Session properties can be used as an alternative to a conforming query -- see FindingNewObjects.'' |
| At line 12 added 14 lines. |
| + Example: |
| + {{{ |
| + ExpressionBuilder user = new ExpressionBuilder(); |
| + Expression exp = user.get("name").equal(name); |
| + |
| + // find new objects in this TX |
| + ReadObjectQuery q = new ReadObjectQuery(User.class, exp); |
| + q.conformResultsInUnitOfWork(); |
| + |
| + return (User) uow.executeQuery(q); |
| + }}} |
| + |
| + Note that {{conformResultsInUnitOfWork}} implies {{checkCacheThenDatabase}} -- they are both convenience methods for [setCacheUsage|javadoc:queryframework/ObjectLevelReadQuery.html#setCacheUsage(int)]. |
| + |
| Line 15 was replaced by lines 29-31 |
| - FindingNewObjects, [forum:280729] |
| + FindingNewObjects, [forum:280729], [forum:240825], [forum:206806] |
| + |
| + The UnitOfWorkPrimer has a good section about conforming queries. |
Back to ConformResultsInUnitOfWork,
or to the Page History.
|