-->
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.  [ 4 posts ] 
Author Message
 Post subject: why access="field" can not work?
PostPosted: Sat Jul 24, 2004 7:47 am 
Newbie

Joined: Sat Jul 24, 2004 7:39 am
Posts: 2
In class A
..
private String pPackageId;
public void setPPackageId(String ppkgId) {
this.pPackageId = ppkgId;
}

public String getPPackageId() {
return pPackageId;
}
...

in the hbm.xml file :
<property name="pPackageId" access="field">
<column name="ppackageid"/>
</property>


but I caught the following exception:
PropertyNotFoundException: Could not find a getter for pActivityId in class

why?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 24, 2004 8:16 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Probably something messed up with the property called "pActivityId"? It is nowhere present in the code you posted.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 24, 2004 9:01 am 
Newbie

Joined: Sat Jul 24, 2004 7:39 am
Posts: 2
michael wrote:
Probably something messed up with the property called "pActivityId"? It is nowhere present in the code you posted.


I am sorry for my mistake. There are serveral properties in the class ,I only show one of them


Top
 Profile  
 
 Post subject: Re: why access="field" can not work?
PostPosted: Sun Jul 25, 2004 12:11 am 
Senior
Senior

Joined: Sat Jul 17, 2004 5:16 pm
Posts: 143
swenker wrote:
In class A
..
private String pPackageId;
public void setPPackageId(String ppkgId) {



If you are writing these classes from scratch, then use safer Javabeans notation where you have at least 2 characters in each "word". so "pPackageId" is not ideal, but "ppPackageId" is better. We use Jakarta beanutils which uses the Sun property API and someitmes it has problems in this area... Chris


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.