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: unable to retrieve field via getter/setter on object
PostPosted: Mon Apr 16, 2007 1:16 pm 
Newbie

Joined: Mon Apr 16, 2007 1:08 pm
Posts: 2
Hibernate version: 3.2.3

Given this class:
> public class Loan {
> public String getValue(){
> return "myValue";
> }
> public void setValue(String s){
> }
> ... addtional properties
> }
> Why can I not do the following hql?
> select loan.value from Loan as loan where ....
> I get
> could not resolve property: value of: com.famc.los.model.Loan [select loan.value from com.famc.los.model.Loan as loan where loan.id = 'AB]:<'];

The mapping is irrelevant in this case. The value from this getter/setter does not specifically map to a column in the database. It is a valid property on the Loan object though. It appears that the hql is only allowing you to access fields on the object, not bean properties.


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.