-->
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: problems with @Formula annotation
PostPosted: Fri Aug 11, 2006 12:35 pm 
Newbie

Joined: Tue Mar 08, 2005 4:57 am
Posts: 8
We are using hibernate3.2.0cr1 and 3.1beta9 annotations.
Our mapping is done with annotations.

I added the following to my class

@Formula("5*5")
public long getTotalCount(){
return totalCount;
}

It was originally an sql, but I trimmed things down to the basics to see if there was a problem elsewhere.

The rest of the class gets populated fine, but this field does not seem to get set by hibernate, although hibernate does seem to fire off the sql to the db (I had show sql = true).

Any tips on where I could be going wrong?

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 18, 2006 11:30 am 
Beginner
Beginner

Joined: Sun Jan 22, 2006 6:56 am
Posts: 29
Do you have a setter method as well?


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.