Hello,
I'm seeing warnings similar to the following logged by hibernate 3.2.0 for all HQL UPDATE statements:
Code:
WARN | org.hibernate.hql.ast.tree.FromElementType.toColumns(FromElementType.java:349) |
Using non-qualified column reference [weight -> ([weight])]
The query executes, but leaves this annoying warning. I'm beginning to think this is a bug in hibernate. Is that true? We're trying to address anything that leaves spurious WARN or ERROR level lines in the logs so that we can panic suitably when something does show up.
The above happens with this HQL statement:
Code:
UPDATE TestEntity SET weight=88 WHERE weight < 50
Run against this entity class:
Code:
@Entity public class TestEntity
{
@Id @GeneratedValue private int id;
@NotNull private String name;
private int weight;
// simple accessors
}
which hibernate generates this table (in mysql atm):
Code:
mysql> describe testentity;
+--------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(255) | NO | | NULL | |
| weight | int(11) | NO | | NULL | |
+--------+--------------+------+-----+---------+----------------+
3 rows in set (0.00 sec)
mysql> select * from testentity;
+----+------+--------+
| id | name | weight |
+----+------+--------+
| 1 | foo | 42 |
| 2 | bar | 69 |
+----+------+--------+
I'm guessing this is the same problem encountered here:
http://forum.hibernate.org/viewtopic.php?t=957837