Posted on Jun 6, 2013 by
Massive Ox
Dynamic insert columns and values using mybatis Below i mentioned my code.Is it posible for doing like below...
<statement id="insert" parameterClass="Attributes">
insert into DataTable
<iterate open="(" close=")" conjunction=",">
(#[].AttributeName#)
</iterate>
(TenantID,ObjectID,Slot0,Slot1)
values
<iterate open="(" close=")" conjunction=",">
#[].AttributeValue#
</iterate>
</statement>
Like Ex: insert into TableName (id,name) values ('101','sekhar')
Status: New
Labels:
Type-Defect
Priority-Low