bilhej/backend
Joakim Mörling fefdea089d refactor: add @ManyToOne User relation to Order entity and @EntityGraph query
- Add @ManyToOne(fetch = LAZY) + @JoinColumn(name = "user_id",
  insertable = false, updatable = false) to Order entity so ORM can
  navigate order.getUser().getEmail() for admin responses
- Keep userId as writable UUID field; the relationship is read-only
  to preserve backward compatibility with existing setUserId() calls
- Add getUser() / setUser() accessors
- Replace handwritten @Query JOIN FETCH with Spring Data derived method
  findAllByOrderByCreatedAtDesc() annotated with @EntityGraph(attributePaths
  = {"user"}) — same eager-load behavior, zero custom JPQL
- No database schema change: user_id FK already exists
2026-05-15 12:14:28 +02:00
..
src refactor: add @ManyToOne User relation to Order entity and @EntityGraph query 2026-05-15 12:14:28 +02:00
.gitattributes feat: scaffold Spring Boot 4 backend with Gradle, Flyway, and H2 2026-05-01 00:28:10 +02:00
.gitignore feat: scaffold Spring Boot 4 backend with Gradle, Flyway, and H2 2026-05-01 00:28:10 +02:00
build.gradle chore: add JWT secret env config, jjwt deps, and docker-compose prod fixes 2026-05-01 17:38:03 +02:00
gradlew.bat feat: scaffold Spring Boot 4 backend with Gradle, Flyway, and H2 2026-05-01 00:28:10 +02:00