-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: HQL UPDATE warns "Using non-qualified column reference&
PostPosted: Thu Oct 19, 2006 7:33 am 
Newbie

Joined: Tue Oct 17, 2006 7:59 am
Posts: 1
Location: Reykjavik
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.