Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Issue in the SQL query generated by SGWT

$
0
0
Hello there,

I am using SmartClient Version: v10.0p_2015-05-08/PowerEdition Deployment (built 2015-05-08) with Firefox 26.

I have this datasource file which I am using to populate a treegrid but for some reason SGWT is adding the condition WHERE IS NULL. Why is it so..

Code:


SELECT expd.id, expd.name, expd.mfk, mepd.id AS didi FR
OM expd LEFT OUTER JOIN mepd ON expd.mfk = mepd.id WHERE (expd.mfk IS NULL)


Here is my datasource file

Code:

<DataSource ID="distributorProductDS" serverType="sql" tableName="expd">
        <fields>
                <field name="id" type="sequence" hidden="true" primaryKey="true" />
                <field name="name" title="Product Name" type="ntext" />
                <field name="mfk" title="ecid" foreignKey="importDisExcelMainDS.id" type="integer" joinType="outer"
                        required="true"/>
                <field name="didi" includeFrom="importDisExcelMainDS.id" hidden="true" />
        </fields>
</DataSource>

and here is my java code

Code:


        DataSource ds = DataSource.get("distributorProductDS");               
               
        Tree employeeTree1 = new Tree(); 
        employeeTree1.setModelType(TreeModelType.PARENT); 
        employeeTree1.setNameProperty("name"); 
        employeeTree1.setOpenProperty("isOpen"); 

               
        final DistributorTreeGrid treeGrid = new DistributorTreeGrid();
        treeGrid.setDataProperties(employeeTree1);
        treeGrid.setDataSource(ds);
        treeGrid.addDrawHandler(new DrawHandler() { 
            public void onDraw(DrawEvent event) { 
                treeGrid.fetchData(); 
            } 
        });


Viewing all articles
Browse latest Browse all 4756

Trending Articles