Skip to content
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

Provide class for inspecting nested projections. #2420

Conversation

meistermeier
Copy link
Contributor

@meistermeier meistermeier commented Jul 26, 2021

As a result there will be a Map<PropertyPath, Boolean>, indicating if the property path "ends" in an entity or not, that can get used as input for a selection/mapping filter in the dedicated store modules.
Maybe it might makes sense to wrap the Map<PropertyPath, Boolean> into an own class. For us it is sufficient right now to use the map.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 26, 2021
@meistermeier meistermeier marked this pull request as draft September 20, 2021 06:19
@meistermeier meistermeier force-pushed the issue/multilevel-projections branch from cf8807d to 08ac9d0 Compare September 20, 2021 08:46
@meistermeier meistermeier marked this pull request as ready for review September 20, 2021 08:47
@schauder
Copy link
Contributor

schauder commented Oct 26, 2021

Isn't a Map<X,Boolean> simply a Set<X>? Or do we need the ternary logic of "it neither bescause it isn't in the Map"?

@meistermeier
Copy link
Contributor Author

This is the problem with partially extracted and outdated documented things (This class is responsible for creating a List of..). In the end we (SDN) need the information if the PropertyPath points towards an entity or not (simple type, other projection definition).

schauder added a commit to spring-projects/spring-data-jpa that referenced this pull request Oct 26, 2021
…aph.

When a property path based projection is specified we still return the root entity.
But we do provide a fetchgraph.
The JPA implementation will (should) load only the specified attributes eagerly.
It most likely will also load all other attributes from all selected tables.

Once we have infrastructure in place for for multilevel projections the same approach can and should be used for those.
Currently this is not the case.

Closes #2329
See spring-projects/spring-data-commons#2420
schauder added a commit to spring-projects/spring-data-jpa that referenced this pull request Oct 27, 2021
…aph.

When a property path based projection is specified we still return the root entity.
But we do provide a fetchgraph.
The JPA implementation will (should) load only the specified attributes eagerly.
It most likely will also load all other attributes from all selected tables.

Once we have infrastructure in place for for multilevel projections the same approach can and should be used for those.
Currently this is not the case.

See #2329
See spring-projects/spring-data-commons#2420
@mp911de mp911de self-assigned this Nov 15, 2021
@mp911de mp911de added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 1, 2021
christophstrobl pushed a commit that referenced this pull request Dec 13, 2021
christophstrobl pushed a commit that referenced this pull request Dec 13, 2021
christophstrobl pushed a commit that referenced this pull request Dec 13, 2021
Original Pull Request: #2420
christophstrobl pushed a commit that referenced this pull request Dec 13, 2021
Original Pull Request: #2420
christophstrobl pushed a commit that referenced this pull request Dec 13, 2021
christophstrobl pushed a commit that referenced this pull request Dec 13, 2021
christophstrobl added a commit that referenced this pull request Dec 13, 2021
Replace boolean flag with enum, assert open vs. closed projection and update javadoc.

Original Pull Request: #2420
@christophstrobl
Copy link
Member

Thanks @meistermeier! Now available on main now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants