HHH-5947: 'Fix' that at least improves the error message
This commit is contained in:
parent
928354827a
commit
9d697660f6
|
@ -1550,7 +1550,7 @@ public class Configuration implements Serializable {
|
|||
sb.append( columnName ).append( ", " );
|
||||
}
|
||||
sb.setLength( sb.length() - 2 );
|
||||
sb.append( ") on table " ).append( table.getName() ).append( ": " );
|
||||
sb.append( ") on table " ).append( table.getName() ).append( ": database column " );
|
||||
for ( Column column : unbound ) {
|
||||
sb.append( column.getName() ).append( ", " );
|
||||
}
|
||||
|
@ -1558,7 +1558,7 @@ public class Configuration implements Serializable {
|
|||
sb.append( column.getName() ).append( ", " );
|
||||
}
|
||||
sb.setLength( sb.length() - 2 );
|
||||
sb.append( " not found" );
|
||||
sb.append( " not found. Make sure that you use the correct column name which depends on the naming strategy in use (it may not be the same as the property name in the entity, especially for relational types)" );
|
||||
throw new AnnotationException( sb.toString() );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import javax.persistence.UniqueConstraint;
|
|||
* @author Manuel Bernhardt <bernhardt.manuel@gmail.com>
|
||||
*/
|
||||
@Entity
|
||||
@Table(uniqueConstraints = {@UniqueConstraint(name = "uniqueWithInherited", columnNames = {"room", "cost"} )})
|
||||
@Table(uniqueConstraints = {@UniqueConstraint(name = "uniqueWithInherited", columnNames = {"room_id", "cost"} )})
|
||||
public class House extends Building {
|
||||
|
||||
public Long id;
|
||||
|
|
Loading…
Reference in New Issue