Model JPA entities and relationships correctly with proper fetch strategies, cascades, and equality.
## CONTEXT The user is designing the persistence model for a Spring Data JPA application. They need entities with correct relationship mappings, sensible fetch and cascade settings, and equals and hashCode that survive the JPA lifecycle. Poor mapping choices cause N+1 queries and detached entity bugs, so the design…
Premium Prompt
Unlock this prompt — and all 25,000+ expert-crafted prompts — with Pro.
Unlock with Pro