Issue Details (XML | Word | Printable)

Key: NUCCORE-1155
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Andy Jefferson
Votes: 0
Watchers: 0
Operations

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

Provide ability for store plugins to load references of related objects and cache them in the ExecutionContext (to save later fetch)

Created: 12/Mar/14 09:09 AM   Updated: 19/Mar/14 11:15 AM
Component/s: Code Structure, Datastore Support, Persistence
Affects Version/s: None
Fix Version/s: None


 Description  « Hide
When a fetch of the DFG is triggered currently this will instruct the store plugin via XXXPersistenceHandler.fetchObject to fetch all unloaded DFG fields. Clearly, for the majority of non-RDBMS store plugins, we could just pull in all relation fields too (since we only store the "persistableId" of the related object in the "table". This information could then be cached in the ExecutionContext, and the first time the ObjectProvider is accessed for the value of that field and it isn't loaded we could call the ExecutionContext to see if there is info for that field and materialise the object(s) from the persistable id(s).

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 19/Mar/14 11:15 AM
ExecutionContext has a mechanism for storing "associated values" of an ObjectProvider, so that can be used for storing these persistableIds