Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add optinal DynamicEntityGraph configuration mode #187

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
anibalanto wants to merge 1 commit into Cosium:master from anibalanto:inic_lab

Conversation

@anibalanto
Copy link

@anibalanto anibalanto commented May 28, 2024
edited
Loading

Hello, I want simplify DynamicEntityGraph configuration.
One option today is:

 Product product =
 productRepository
 .findById(
 1L,
 ProductEntityGraph.____()
 .brand()
 .____
 .category()
 .____
 .maker()
 .country()
 .____
 .____())
 .orElseThrow(RuntimeException::new);
 }

I add an option to do the same:

 Product product =
 productRepository
 .findById(
 1L,
 ProductEntityGraph.inic_(
 productEG ->
 productEG
 .brand_()
 .category_()
 .maker_(makerEG -> 
 makerEG
 .country_())))
 .orElseThrow(RuntimeException::new);

Copy link
Member

@anibalanto I don't understand the expected gains with this PR. Could you give more details?

@anibalanto anibalanto changed the title (削除) Add optinal DynamicEnityGraph configuration mode (削除ここまで) (追記) Add optinal DynamicEntityGraph configuration mode (追記ここまで) May 28, 2024
Copy link
Author

anibalanto commented May 28, 2024
edited
Loading

Hello @reda-alaoui ! I update my first description.

Thank!

Copy link
Member

reda-alaoui commented May 28, 2024
edited
Loading

@anibalanto , I don’t find the added option more readable. IMO, adding it to the project will lead to cluttered code in consuming projects.

If you want/need an extension point to plug a custom EG style defined outside of this project, I’d welcome it. But maybe you should just create a full annotation processor on your side without using the one defined here.

anibalanto reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /