diff --git a/data-jpa-3-to-4/README.md b/data-jpa-3-to-4/README.md index d16bc02..9df02fb 100644 --- a/data-jpa-3-to-4/README.md +++ b/data-jpa-3-to-4/README.md @@ -21,8 +21,9 @@ One source tree, built twice. `common/` holds the application and tests that com | H2 | 2.3.232 | 2.5.252 | | JDK | 25 (Temurin 25.0.5) | 25 | -The boot4 tests were also run on Spring Boot 4.0.10 and 4.1.3. Output 15 and 16 were added afterwards and are -recorded for 3.5.16 and 4.2.0 only. +The boot4 tests behind outputs 02 to 15 were also run on Spring Boot 4.0.10 and 4.1.3. Outputs 16 and 23 to 25 +were added afterwards and are recorded for 3.5.16 and 4.2.0 only. `scripts/audit-prompt.txt` is the review prompt +quoted in the post. ## Run it diff --git a/data-jpa-3-to-4/scripts/audit-prompt.txt b/data-jpa-3-to-4/scripts/audit-prompt.txt new file mode 100644 index 0000000..8533411 --- /dev/null +++ b/data-jpa-3-to-4/scripts/audit-prompt.txt @@ -0,0 +1,20 @@ +You are auditing a Java/Spring persistence layer for a Spring Data JPA 3.5 -> 4.x +migration (Spring Boot 4, Hibernate 7, Jakarta Persistence 3.2, Jackson 3). +Report each finding as file:line with the exact replacement, ordered by risk. + +1. Imports of org.springframework.data.mapping.PropertyPath or PropertyReferenceException, + or org.springframework.data.util.TypeInformation (moved to org.springframework.data.core). +2. @PersistenceConstructor, new QPageRequest(..), hibernate-jpamodelgen. +3. repository.delete(specification), Specification.where(null), .and(null) / .or(null). +4. Hibernate Session.save / saveOrUpdate / update / delete, and @Where. +5. @NullMarked packages: finders with a non-Optional, non-@Nullable return type that + can find nothing. +6. Native queries whose results are cast to java.sql.Date, Time or Timestamp. +7. Record projections on derived queries whose component names are not entity properties. +8. Window / keyset queries sorted by a nullable column. +9. Controllers returning Page, Slice or Window directly; tests that compare raw JSON. +10. Request bodies with primitive fields that clients may omit. +11. Old Boot 3 test imports, EntityScan imports, Jackson2ObjectMapperBuilderCustomizer, + spring.dao.exceptiontranslation.enabled, and the system property + spring.data.jpa.query.native.parser. +Do not report a finding you cannot point to in a file.