ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abdullah Kauchali <abdullah.kauch...@isanusi.com>
Subject Dynamic Prepend and removal of "beginning" prepends
Date Wed, 03 Aug 2005 10:06:46 GMT
<insert id="create" parameterClass="DirectoryTypeBean">
 
INSERT INTO SEC_DirectoryType (
   
    <dynamic prepend="">        
        <isNotEmpty prepend="," property="directoryType_Code">
            DirectoryType_Code
        </isNotEmpty>
        <isNotEmpty prepend="," property="directoryType_ConnectionFactory">
            DirectoryType_ConnectionFactory
        </isNotEmpty>
        <isNotEmpty prepend="," property="directoryType_JavaApiValues">
            DirectoryType_JavaApiValues
        </isNotEmpty>
        <isNotEmpty prepend="," property="directoryType_DotNetApiValues">
            DirectoryType_DotNetApiValues
        </isNotEmpty>
 
        .....
 
 </dynamic>


I get incorrect SQL syntax when the first value is empty - iow:  there 
is a comma before the first column.

INSERT INTO SEC_DirectoryType (    ,   DirectoryType_ConnectionFactory ....

What do I do to get rid of the first comma?

TIA,

Kind regards

Abdullah

Mime
View raw message