ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Pitts" <Daniel.Pi...@cnet.com>
Subject RE: No writeable property in class. Bug? Strange work arounds.
Date Mon, 02 Apr 2007 23:59:03 GMT
Its my understanding that you're property name should start with a
lowercass letter, not an uppercase letter.
getMyProperty() will get the "myProperty" property.  There is no
"MyProperty", and no way to create one, short of implementing a BeanInfo
class.  Who wants to do that? And I don't think iBATIS supports standard
bean introspection, so a BeanInfo class isn't going to help in this
case.


________________________________

	From: Antony Stubbs [mailto:antony.stubbs@gmail.com] 
	Sent: Monday, April 02, 2007 4:53 PM
	To: user-java@ibatis.apache.org
	Subject: No writeable property in class. Bug? Strange work
arounds.
	
	

	I think I have a similar problem to this thread
<http://www.nabble.com/There-is-no-WRITEABLE-property-called-%27UserId%2
7-in-AppUser-tf1404646.html#a3789203> . 

	I have some columns named c_value, l_state etc in the db (I
can't change the scheme) and the abator generated code complains that
"There is no WRITEABLE property named 'cValue' in class
'com.fonterra.tams.orm.abator.model.TankerLog'", when in fact there is. 

	Two things seem to fix this - either using 
	columnOverride column="l_state" property="LState"

	or 

	Setting useActualColumnNames to *true* for each table that has
this problem. 

	or 

	Renaming the db column simply to double the first lower case
letter (e.g. ll_state instead of l_state). 

	I'd prefer not to have to do either. 

	Any ideas? 
	Caused by: java.lang.RuntimeException: Error initialising
BaseIbatisDao class. Cause: java.lang.RuntimeException: Error occurred.
Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: java.lang.RuntimeException: Error parsing XPath
'/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException:
Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing
XPath '/sqlMap/resultMap/result'.  Cause:
com.ibatis.common.beans.ProbeException: There is no WRITEABLE property
named 'cValue' in class 'com.fonterra.tams.orm.abator.model.TankerLog'
	tanker_log_SqlMap.xml
<http://www.nabble.com/file/7622/tanker_log_SqlMap.xml> TankerLog.java
<http://www.nabble.com/file/7623/TankerLog.java> TruckTDAOImpl.java
<http://www.nabble.com/file/7624/TruckTDAOImpl.java>  
			table schema="tams" tableName="tanker_log"
modelType="flat" 
				columnOverride column="l_state"
property="LState"/
				columnOverride column="a_min"
property="AMin"/		
			/table
	DROP TABLE IF EXISTS `tams`.`tanker_log`;
	CREATE TABLE  `tams`.`tanker_log` (
	  `tanker_header_id` int(10) unsigned NOT NULL auto_increment,
	  `tanker_message_id` int(10) unsigned NOT NULL default '0',
	  `variable_id` int(10) unsigned NOT NULL default '0',
	  `sample_timestamp` int(10) unsigned NOT NULL default '0',
	  `l_state` varchar(3) NOT NULL default '',
	  `cc_value` int(10) unsigned NOT NULL default '0',
	  `a_min` int(10) unsigned NOT NULL default '0',
	  `a_max` int(10) unsigned NOT NULL default '0',
	  `a_avg` int(10) unsigned NOT NULL default '0',
	  `a_snapshot` int(10) unsigned NOT NULL default '0',
	  `a_in_greenband` varchar(3) NOT NULL default '',
	  `a_in_greenband_duration` int(10) unsigned NOT NULL default
'0',
	  PRIMARY KEY
(`tanker_header_id`,`tanker_message_id`,`variable_id`,`sample_timestamp`
)
	) ENGINE=InnoDB DEFAULT CHARSET=latin1;

________________________________

	View this message in context: No writeable property in class.
Bug? Strange work arounds.
<http://www.nabble.com/No-writeable-property-in-class.-Bug--Strange-work
-arounds.-tf3508972.html#a9801228> 
	Sent from the iBATIS - User - Java mailing list archive
<http://www.nabble.com/iBATIS---User---Java-f370.html>  at Nabble.com.
	


Mime
View raw message