Skip to content

DATAMONGO-1733 - Allow open/closed interface projections directly via fluent API. #486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from

Conversation

christophstrobl
Copy link
Member

ℹ️ This is work in progress. Do not merge - needs discussion!

We now directly support open and closed interface projections in the fluent API. For closed interface projections we add the according field list to optimize query execution in those cases where the actual Query does not already define the fields to load/exclude.

@christophstrobl christophstrobl changed the title Issue/datamongo 1733 DATAMONGO-1733 - Allow open/closed interface projections directly via fluent API. Jul 13, 2017
odrotbohm pushed a commit that referenced this pull request Jul 20, 2017
Interfaces based projections handed to queries built using the FluentMongoOperations APIs now get projected as expected and also apply querying optimizations so that only fields needed in the projection are read in the first place.

Original pull request: #486.
odrotbohm pushed a commit that referenced this pull request Jul 20, 2017
odrotbohm added a commit that referenced this pull request Jul 20, 2017
Tiny improvements to the ProjectingReadCallback as we now skip null values completely. Made the ProjectionFactory an instance variable to make sure we propagate the BeanFactory and BeanClassLoader in setApplicationContext(…). Added unit test to verify instances aren't proxied unnecessarily if the interface asked for is already implemented by the target.

Original pull request: #486.
Related tickets: DATACMNS-1121.
@odrotbohm odrotbohm closed this Jul 20, 2017
@odrotbohm odrotbohm deleted the issue/DATAMONGO-1733 branch July 20, 2017 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants