It is there to specify another column as the default id column of the other table, e.g. consider the following
TableA
id int identity
tableb_key varchar
TableB
id int identity
key varchar unique
// in class for TableA
@JoinColumn(name="tableb_key", referencedColumnName="key")
More Related Contents:
- JPA 2.0 many-to-many with extra column
- Hibernate throws org.hibernate.AnnotationException: No identifier specified for entity: com..domain.idea.MAE_MFEView
- JPA CriteriaBuilder – How to use “IN” comparison operator
- How to use JPA2’s @Cacheable instead of Hibernate’s @Cache
- JPA JoinColumn vs mappedBy
- Hibernate Annotations – Which is better, field or property access?
- What is the solution for the N+1 issue in JPA and Hibernate?
- Bypass GeneratedValue in Hibernate (merge data not in db?)
- How to generate Custom Id using hibernate while it must be primary key of table
- How does JPA orphanRemoval=true differ from the ON DELETE CASCADE DML clause
- Hibernate – @ElementCollection – Strange delete/insert behavior
- How to use @Where in Hibernate
- Does the JPA specification allow references to non-primary key columns?
- Hibernate: comparing current & previous record
- Why do I need to configure the SQL dialect of a data source?
- Struggling to understand EntityManager proper use
- Hibernate problem – “Use of @OneToMany or @ManyToMany targeting an unmapped class”
- How to use the Java 8 LocalDateTime with JPA and Hibernate
- Is it possible to output generated SQL using EclipseLink without having to increase log verbosity?
- JPA: Implementing Model Hierarchy – @MappedSuperclass vs. @Inheritance
- JPA/Hibernate remove entity sometimes not working
- How to configure Spring to make JPA (Hibernate) and JDBC (JdbcTemplate or MyBatis) share the same transaction
- Hibernate ID Generator
- JPA Uppercase table names
- Specifying an Index (Non-Unique Key) Using JPA
- inverse=true in JPA annotations
- Hibernate throws strange error: Class is not mapped
- Clarifying terminology – What does “hydrating” a JPA or Hibernate entity mean when fetching the entity from the DB
- Hibernate 3.6 – session.get() vs session.load()
- createEntityManager throws java.lang.NullPointerException at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.getStatus