datasource in query

Hi,

It works, but than i make new record in itemstrans, it calls insert() method in items table. I have added items table to datasource and change linktype: innerjoin, and joinsource: itemsTrans table. maybe it will not call insert() if i set datasource in X++?

i need to make a query, which looks now like this:

public void executeQuery()

{

QueryBuildRange qbr1;

QueryBuildRange qbr2;

Query query;

Query query1;

;

qbr1 = SysQuery::findOrCreateRange(

this.query().dataSourceTable(tablenum(GIR_IT_Items)),

fieldnum(GIR_IT_Items, statusNew));

qbr2 = SysQuery::findOrCreateRange(

this.query().dataSourceTable(tablenum(GIR_IT_ItemsTrans)),

fieldnum(GIR_IT_ItemsTrans, Operation));

if (CtrlShowLast.value())

{

qbr1.value(SysQuery::value(GIR_IT_item_status::Isduotas));

qbr2.value(SysQuery::value(“ISDAVIMAS_VARTO”));

}

else

{

qbr1.value(SysQuery::valueUnlimited());

qbr2.value(SysQuery::valueUnlimited());

}

super();

}