Checked into trunk:
Correction patch after James' review.
James' comments:
-
addPartialAttribute, did you also deprecate the one that takes an
_expression_?
- ObjectLevelReadQuery,
addSelectionFieldsForJoinedExpression, code is odd, cast to
Vector<DatabaseField> but then casts to Object and allows
_expression_?
- getFetchGroupSelectionFields, in general try to avoid using
Vector (List).
- shouldReadMapping, short circuit was
removed?
Some more comments from refreshing my view.
-
FetchGroupManager, has a bunch of public methods that should be
marked internal
- Should have a test for embeddable attributes, we
should probably throw some kind of error if we don't support this, also
aggregate collections.
- ForeignReferenceMapping, batchValueFromRow, the
setting of the fetch group should be in the prepare of the nested batch
query, not cloning it and repreparing it.
- FetchGroup, set/shouldLoad
should have a user comment explaining what is does
- LoadGroup, should
avoid using DescriptorIterator as performance issue and not polymorphic,
should dispatch to ObjectBuilder/mappings
- ObjectLevelReadQuery, setting
of fetch group should be in mapping, not cloning and repreparing query in
query
- ClassWeaver, does not look like fetch groups are weaved if change
tracking is not weaved?
- MethodWeaver, same thing
-
QuerySQLTracker uses tabs, also the class already exists in the
testing framework package, so no need to define another
The patch
corrects most of the problems mentioned in these comments.
----- Original Message -----
Sent: Tuesday, May 25, 2010 5:24 PM
Subject: Re: [eclipselink-dev] Re: Bug
244124 - Add Nested FetchGroup
Bug 244124 - Add Nested FetchGroup
Checked into trunk two independent patches for fetch
groups: fetch joins and weaving.
Fetch join patch - take 2.
A new version of patch that adds support for fetch joins used
together with
nested fetch groups.
In case joined attribute is outside of the fetch group a
WARNING is logged.
The query still works but very inefficiently: the fetch group
is triggered and
the whole object is read in.
The only possibility here would be to throw an exception
instead - throwing
away joined attribute (don't know how hard that would be to
do) doesn't seem
right - both fetch group and fetch joins specified directly on
the query.
Weaving patch
Fixes some weaving problems introduced in Main patch (see bug
314340).
This patch fixes only part of that bug: static weaving tests
pass, but
beanvalidation tests still
fail.
----- Original Message -----
Sent: Tuesday, May 25, 2010 3:06
PM
Subject: Re: [eclipselink-dev] Re: Bug
244124 - Add Nested FetchGroup
Fetch join patch - take 2.
A new version of patch that adds
support for fetch joins used together with nested fetch groups.
In
case joined attribute is outside of the fetch group a WARNING is
logged. The query still works but very inefficiently: the fetch group is
triggered and the whole object is read in.
The only possibility
here would be to throw an exception instead - throwing away joined
attribute (don't know how hard that would be to do) doesn't seem right -
both fetch group and fetch joins specified directly on the query.
----- Original Message -----
Sent: Wednesday, May 19, 2010 4:33
PM
Subject: Re: [eclipselink-dev] Re:
Bug 244124 - Add Nested FetchGroup
Addition to prev. patch Added load method to AbstractSession,
too.
Checked into trunk.
----- Original Message -----
Sent: Wednesday, May 19, 2010 3:35
PM
Subject: [eclipselink-dev] Re: Bug
244124 - Add Nested FetchGroup
Checked into trunk Main patch - take 3. There are
some things not done yet: 1) merging in cache still uses "one-storey"
union; 2) fetch joins
All the fetch groups assigned to objects now are of
type EntityFetchGroup. It's a flat (not nested) fetch group that only
reflects the state of its owner object. A single EntityFetchGroup
may be shared by many objects, and it is immutable. An
EntityFetchGroup usually not created directly but rather looked up on
the FetchGroupmanager (keyed by set of its attributes).
When a value is set into not fetched attribute in
serialized object (the one that doesn't have a session) then a new
EntityFetchGroup created to reflect the new object's fetch
state.
Deprecated partial attributes Added
LOAD_GROUP_ATTRIBUTE QueryHint. Added "load" method to
JpaEntityManager.
----- Original Message -----
Sent: Friday, May 14, 2010 8:51
PM
Subject: Re: Bug 244124 - Add
Nested FetchGroup
Rolledback my last fix for Bug 244124 - Add Nested FetchGroup.
It caused cb test failures in moxy and dbws.
Back to the prev. rev.7240
Will investigate on Monday.
----- Original Message -----
Sent: Friday, May 14, 2010 5:58
PM
Subject: Bug 244124 - Add
Nested FetchGroup
Checked into trunk.
Main patch.
The patch provides basic nested fetch group
functionality.
FetchGroup got a new shouldLoad flag - it
indicates whether its attributes should be loaded. Also there
is a new class LoadGroup, which allows to manage loading
of individual relational attributes.
There is still work
to be done in the area of merging with cache and
fetch joins.
A new test package
org.eclipse.persistence.testing.tests.jpa.fetchgroups
was added.
See simple examples of different loading
arrangements in findMinEmployee tests in
NestedDefaultFetchGroupTests.
A simple merge was tested and
works: serialize object with a fetch group applied to
it; update serialized object (even attribute outside the fetch
group); serialize it back to the server; merge. See a
simple example in
SimpleSerializeFetchGroupTests.simpleSerializeAndMerge.
_______________________________________________ eclipselink-dev
mailing
list eclipselink-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
_______________________________________________ eclipselink-dev
mailing
list eclipselink-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
_______________________________________________ eclipselink-dev
mailing
list eclipselink-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
_______________________________________________ eclipselink-dev
mailing
list eclipselink-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
|