-->
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: Hibernate3 warning Using non-qualified column reference
PostPosted: Tue Jul 18, 2006 10:04 am 
Newbie

Joined: Fri Nov 05, 2004 11:09 am
Posts: 6
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: hibernate-3.1.3
Name and version of the database you are using: Oarcle 10

I am trying to upgrade my Hibernate from version 2 to 3, and to extent got many of the things to work except this one which is giing me hard time, so thought someone might help me out with this.

I have an User who can have one-to-many Permissions.

I have the User object but it doens't have any relation to the Permissions object in the User.hbm.xml file.

I have the Permssions object which has many-to-one as folows
@hibernate.many-to-one column="USERID" class="bo.User"
outer-join="auto" insert="true" update="false"

So when the User is deleted I am trying to run a query to delete explicitly to remove all the permissions and then the user as follows:

Query q = getSession().createQuery("delete from bo.Permission where user=:usr").setEntity("usr", user);
int n = q.executeUpdate();
getHibernateTemplate().delete(user);

But when trying to execute the same I am getting the error as follows:

14:09:15,296 INFO [STDOUT] deleteUser called
14:09:15,296 WARN [FromElementType] Using non-qualified column reference [user -> ([USERID])]
14:09:15,343 INFO [STDOUT] Hibernate: insert into HT_TPERMISSIONS select user0_.PERMISSIONID as PERMISSIONID from TPERMISSIONS user0_ where USERID=?
14:09:15,375 INFO [STDOUT] Hibernate: delete from TPERMISSIONS where (PERMISSIONID) IN (select PERMISSIONID from HT_TPERMISSIONS)
14:09:15,390 INFO [STDOUT] Hibernate: delete from HT_TPERMISSIONS
14:09:15,406 INFO [STDOUT] number deleted from Permission is:: 1
14:09:15,421 INFO [STDOUT] Hibernate: delete from TUSER where USERID=?

And it doesn't delete from the TPERMISSIONS table as mentioned above.
Also I am not sure why it is trying to write to a separate table and then get from it and delete from there.

Please let me know if anyone came across this situation.


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.