ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From felix thomas <reachfe...@yahoo.co.in>
Subject XMLType handler is working in somecases but not in some
Date Wed, 18 Jul 2007 10:20:26 GMT
hi,

I have 2 columns defaultvalue & formula with XMLtype
in Oracle . 
But while inserting in the table it gave me error
saying invalid column type for formula.

I tried using the XMLTytpehandler code but it there
the exception XMLType mapping only supported for
Oracle RDBMS in the setparameter class.

Bean class

private String formula;
private String defaultValue;

public String getDefaultValue() 

Unknown macro: { return defaultValue; } 

public void setDefaultValue(String defaultValue) 
Unknown macro: { this.defaultValue = defaultValue; } 

public int getFormulaFieldTypeId() 

Unknown macro: { return formulaFieldTypeId; } 

public void setFormulaFieldTypeId(int
formulaFieldTypeId) 
Unknown macro: { this.formulaFieldTypeId =
formulaFieldTypeId; } 

sqlMap file:
----------- 

<result column="DEFAULT_VALUE" property="defaultValue"
jdbcType="OTHER" />
<result column="FORMULA" property="formula"
jdbcType="ORACLEOPAQUE"/>

sqlConfig file
--------------
<sqlMapConfig>
<typeHandler
callback="com.sb.common.utils.XMLTypeHandlerCallback"
javaType="java.lang.String" jdbcType="ORACLEOPAQUE" />

But simce formula column was not mandatory i removed
it from the insert statement and it inserted with any
error. 

<insert id="insertCustomField"
parameterClass="com.sb.model.CustomField" >

<selectKey keyProperty="fieldId" resultClass="int" >
SELECT record_id.NEXTVAL AS ID FROM DUAL
</selectKey>
insert into FIELD (FIELD_ID, NAME, OBJECT_ID,
SORT_ORDER, FIELD_SIZE, FIELD_TYPE_ID,
FIELD_TYPE_CODE, DEFAULT_VALUE, IS_STANDARD,
IS_PRIMARY_KEY, IS_REQUIRED, IS_UNIQUE_VALUE,
IS_UNIQUE_IGNORE_CASE, IS_EXTERNAL_ID,
IS_CHANGE_RECORDS, IS_TRACK_CHANGES, LENGTH,
DECIMAL_PLACES, DISPLAY_FORMAT, STARTING_NUMBER,
PARENT_OBJECT_ID, LOV_TYPE_ID, IS_LOV_SORT,
IS_LOV_DEFAULT_FIRST,FORMULA_FIELD_TYPE_ID,
VISIBLE_LINES, CONTROLLING_FIELD_ID,
PARENT_SIZE, CHILD_SIZE, LANGUAGE_ID, LABEL,
DESCRIPTION, CREATED_BY, CREATED_ON, MODIFIED_BY,
MODIFIED_ON)
values (#fieldId#,#name:VARCHAR#, 2593,
#sortOrder:VARCHAR#,
#fieldSize:NUMERIC#, #fieldTypeId:NUMERIC#,
#fieldTypeCode:NUMERIC#, #defaultValue:OTHER#,
'Y','N','Y','N',
'N','N','N','N',
#length:NUMERIC#, #decimalPlaces:NUMERIC#,
#displayFormat:VARCHAR#, #startingNumber:NUMERIC#,
#parentObjectId:NUMERIC#, #lovTypeId:NUMERIC#,
#isLovSort:CHAR#, #isLovDefaultFirst:CHAR#,
#formulaFieldTypeId:NUMERIC#, #visibleLines:NUMERIC#,
#controllingFieldId:NUMERIC#, #parentSize:VARCHAR#,
#childSize:VARCHAR#,6,
#label#,
#description#,1,'17-Jul-2007',1,'17-Jul-2007')
</insert>

I was wondering how for dafultvalue column it is
working bit for formula column it is not working
?????. Looks like abug 

Regards,
Felix T




      Once upon a time there was 1 GB storage in your inbox. To know the happy ending go to
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html

Mime
View raw message