Issue Details (XML | Word | Printable)

Key: NUCRDBMS-431
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Andy Jefferson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Allow user to specify that fetch of a 1-1 FK field should only fetch the FK (and not the fields of the related object)

Created: 14/Jul/10 10:52 AM   Updated: 20/Oct/10 09:30 AM   Resolved: 14/Jul/10 10:55 AM
Component/s: Queries
Affects Version/s: None
Fix Version/s: 2.2.0.m1


 Description  « Hide
If we have a class A that has a field "b" of type B and we query for A's and "b" is in the fetch plan, then we may just want to fetch the FK of the "B".

Andy Jefferson added a comment - 14/Jul/10 10:55 AM
SVN trunk now supports a metadata extension on the field/property of "fetch-fk-only".

Andy Jefferson made changes - 14/Jul/10 10:55 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Chris Colman added a comment - 21/Jul/10 12:27 AM
Should this be the default when no fetch plans are specified? There's no real advantage to fetching stuff that may not be needed for the immediate operation.

Does the case of not specifying this option mean an effective 'fetch by reachability' for 1-1 relationships?

eg.,
Say A has a 1-1 relationship with B which has a 1-1 relationship with C:

A -> B -> C

By loading A would C therefore be loaded?

I realize these types of extensive 1-1 relationships are probably rare.

Andy Jefferson made changes - 20/Oct/10 09:30 AM
Status Resolved [ 5 ] Closed [ 6 ]