devonfw / devon4j

devonfw Java stack - create enterprise-grade business apps in Java safe and fast
Apache License 2.0
83 stars 87 forks source link

refactoring JPA guide #435

Closed GuentherJulian closed 3 years ago

GuentherJulian commented 3 years ago

Refactoring the JPA guide to align with Quarkus related stuff. Closes https://github.com/devonfw/devon4quarkus/issues/7

hohwille commented 3 years ago

Besides, acutally I expect the bigger changes in the jpa-repository guide. Here we created a proprietary solution with DefaultRepository that smoothly integrates with QueryDSL without the need of this "Fragment-Approach". This should be changed to a pure Spring-Data approach based on JpaRepository and explaining how to do QueryDSL integration via "Fragment". Then we can link to a devon4j-spring specific guide that explains how this can be simplified by extending DefaultRepository and implementing the QueryDSL query directly in the interface via default method. That is actually the entire concept behind our extension to spring-data in devon4j and this would make that more transparent and clear.

GuentherJulian commented 3 years ago

Besides, acutally I expect the bigger changes in the jpa-repository guide. Here we created a proprietary solution with DefaultRepository that smoothly integrates with QueryDSL without the need of this "Fragment-Approach". This should be changed to a pure Spring-Data approach based on JpaRepository and explaining how to do QueryDSL integration via "Fragment". Then we can link to a devon4j-spring specific guide that explains how this can be simplified by extending DefaultRepository and implementing the QueryDSL query directly in the interface via default method. That is actually the entire concept behind our extension to spring-data in devon4j and this would make that more transparent and clear.

Refactored the spring data guide so that it is explaining the fragment approach. Created a separate file for the devon4j-spring way. https://github.com/GuentherJulian/devon4j/blob/jpa_guide/documentation/guide-repository.asciidoc https://github.com/GuentherJulian/devon4j/blob/jpa_guide/documentation/spring/guide-spring-data.asciidoc