79505176

Date: 2025-03-13 00:53:47
Score: 1.5
Natty:
Report link
  1. Check Hibernate SQL Output
    Enable SQL query logging to see what queries Hibernate is executing:
    Add this to application.properties:

    spring.jpa.show-sql=true
    spring.jpa.properties.hibernate.format_sql=true

  2. Check the console logs when making the GET request. If Hibernate is querying player_stats instead of "Player_Stats", it means case sensitivity is the problem.
    Ensure Entity Scanning Is Enabled
    This ensures Spring Boot recognizes Player as a valid entity.

  3. Try changing to @Service on PlayerService and check

  4. PostgreSQL treats unquoted table names as lowercase by default. Your entity is mapped to "Player_Stats" (with mixed case), but Spring Boot, by default, generates queries using lowercase (player_stats).

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @Service
  • Low reputation (0.5):
Posted by: Jangachary