-->
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.  [ 2 posts ] 
Author Message
 Post subject: hql special property id
PostPosted: Tue Mar 28, 2006 11:21 am 
Newbie

Joined: Wed Mar 16, 2005 5:06 am
Posts: 4
Hi, I'm having some trouble with the special property 'id' in hql... My object also has a property 'id' so I can't use it in my hql queries :-( Is there a work around for it something like myObject['id']=:value ? When using myObject.id, it replaces id with the pk field of my table.

Best regards


Top
 Profile  
 
 Post subject: 2c
PostPosted: Tue Mar 28, 2006 3:47 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
create getMyID()/setMyID() methods to access the id field and map them in the hibernate.

Because you have not used id field as PK I think that your id field might have less generic nice name like "catalogId" or something like that.

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


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

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.