|
The test case hhh10234.zip contains...
@Entity
@Table(name = "primary_table")
@SecondaryTable(name = "secondary_table")
public class BeanOneTwo implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
private String one;
private String two;
@Id
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Column
public String getOne() {
return one;
}
public void setOne(String one) {
this.one = one;
}
@Column(table = "secondary_table")
public String getTwo() {
return two;
}
public void setTwo(String two) {
this.two = two;
}
}
and also BeanOneTwoNamedX.java, where the columns for 'one' and 'two' are both named 'x'.
-
update BeanOneTwo b set b.one=b.two
-
update BeanOneTwo b set b.two=b.one
-
update BeanOneTwoNamedX b set b.one=b.two
-
update BeanOneTwoNamedX b set b.two=b.one
The first two HQL-updates generate wrong SQL, the latter two generate SQL 'doing nothing'.
|