-->
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: @Formula returns null property value in hibernate 4.
PostPosted: Mon Jul 07, 2014 10:30 pm 
Newbie

Joined: Mon Jul 07, 2014 10:22 pm
Posts: 1
Hi Guys,

We have migrated our project from hibernate 3.1.x to hibernate 4.1.x version. We are having problem with @Formula annotation.
The getter field is returning null values for all @Formula mappings. I really do not know what is happening though, it seems working fine using
the older version.

Here is the sample formula.

Code:
   @Formula(value="(select crs.name from EntityName crs where crs.id = id)")
   public String getName() {
      System.out.println(" review set -- " + name);
       return name;
   }


I have checked the generated SQL and is working fine when i try to query it. Is there something that I am missing here.
Your help will be appreciated. Thanks


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.