You would do that when the responsibility of creating/updating the referenced column isn’t in the current entity, but in another entity.
More Related Contents:
- The JPA hashCode() / equals() dilemma
- What’s the difference between JPA and Hibernate? [closed]
- Can someone explain mappedBy in JPA and Hibernate?
- Why does JPA have a @Transient annotation?
- How to create and handle composite primary key in JPA
- When to use EntityManager.find() vs EntityManager.getReference() with JPA
- @PreUpdate and @Prepersist in hibernate/JPA (using session)
- Parameter in like clause JPQL
- Hibernate bidirectional @ManyToOne, updating the not owning side not working
- JPA map collection of Enums
- No Persistence provider for EntityManager named X
- MappedSuperclass – Change SequenceGenerator in Subclass
- stream on JPA lazy list
- persistence.xml different transaction-type attributes
- JPA Multiple Embedded fields
- Java8 Collections.sort (sometimes) does not sort JPA returned lists
- Disable caching in JPA (eclipselink)
- Difference between a “jta-datasource” and a ” resource-local ” datasource?
- PersistenceUnit vs PersistenceContext
- No operator matches the given name and argument type(s). You might need to add explicit type casts. — Netbeans, Postgresql 8.4 and Glassfish
- Is it possible to write a generic enum converter for JPA?
- JPA: JOIN in JPQL
- Why does this stream return no element?
- LOAD and CACHE application-scoped data with @Singleton and @Stateless
- What’s the difference between the IN and MEMBER OF JPQL operators?
- EclipseLink 2.7.0 and JPA API 2.2.0 – signature mismatch
- How to create join table with JPA annotations?
- How to auto detect entities in JPA 2.0
- JPA: difference between @JoinColumn and @PrimaryKeyJoinColumn?
- How to use Postgres JSONB datatype with JPA?