-->
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.  [ 3 posts ] 
Author Message
 Post subject: Troubles and Troubleshooting
PostPosted: Tue Aug 08, 2006 1:53 am 
Newbie

Joined: Tue Aug 08, 2006 1:32 am
Posts: 2
I have admitted to an error message .
Quote:
The getter method for QuantityPerInut is not found in net.hjt.items.Item


But the problem is more problematic because I have provided the getter abd setter methods for this field quantityperunit .
The name of the field in the table is also same and same is that in the hibernate mapping file for the Items table where I have to store this information .

Looking Forward for Replies ....

_________________
ACP Masquerade
Awesome Computer Programmer with Engineering Gene


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 08, 2006 12:38 pm 
Senior
Senior

Joined: Wed Aug 17, 2005 12:56 pm
Posts: 136
Location: Erie, PA (USA)
Maybe a typo in your post, but "quantityperunit" is not the same as "QuantityPerInut". Spelling matters, case sensitivity matters.

Probably stating the obvious but the property "quantityPerUnit" should have a getter "getQuantityPerUnit()" and a setter "setQuantityPerUnit(...)"

Curtis ...

_________________
---- Don't forget to rate! ----


Top
 Profile  
 
 Post subject: The Blunder in during getter and setter methods
PostPosted: Mon Aug 14, 2006 1:50 am 
Newbie

Joined: Tue Aug 08, 2006 1:32 am
Posts: 2
Firstly thanks for the help .....
Now I would like to explain what was the blunder I had made ..

My private data name was unitprice and I had made my Getter and Setter methods with the following naming convention
Code:
public void setUnitPrice(Double unitprice)
                        {
                            .....
                              .......
                        }


Hence now I would like to inform all the hibernate users not to use the name of the Getter and Setter methods as these but only make the first character after get or set as capital as getUnitprice() setUnitprice

BesToFlock

_________________
ACP Masquerade
Awesome Computer Programmer with Engineering Gene


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.