Duplicates in TableView

Hello,

Suddenly, all my table views are presenting duplicated data ( cf attached screenshot ) while for sure the database doesn’t have those errors, any ID being unique.
I tried a few server restart, and even loaded a new solution, which actually has no difference with the previous one, with bo effect.

Using Servoy 6.0.6

Anyone with an idea, this is very problematical.

Looks like a query containing a left join where the related data returns multiple rows for 1 row in the primary table.

Best is to check on what is happening in the servoy-admin pages > tab: performance
Clear everything what’s in there, then navigate to this particular table, refresh the performance tab and see what is in there.

Is this a custom query or generated by servoy?

Hi,

Thanks for your answer. Actually, this is the result of a addTableFilterParam, I will inspect the dataset that comes with it

Ugo

Ok,

After some investigation, it seems that I’m loading a foundset twice, but I can’t find where. Here’s the code used on startup, no other filter is applied later on, and the result shawn in the scrrenshot is strictly the table foundset ( no relation in tabpanel )

...some code before which will help :
- determine a premiminary dataset containing all entities directly connected to the user through a given relation
- set a first global table filter param...
..the result is stored in a variable
globals._app__aMy_entitesIDs=_myentities;

//then we apply another filter in order to get only any entity which are children from 'parent entities' connected to the user
//this will help extend the foundset to the children when we will apply the final filter
if (databaseManager.addTableFilterParam('my_db', null,'parent_ent_id','IN',globals._app__aMy_entitesIDs,'myglobfilterparent')==false){		
	//An error occured
	catchloginerror(_errorcode);
}
else{
	_filtered_entfs=databaseManager.getFoundSet('my_db', 'entites');
	_filtered_entfs.loadAllRecords();
	//at this stage, we get only those entities with a parent_id that is part of our previous filter
	
	_all_entitiesdset= databaseManager.convertToDataSet(_filtered_entfs,['ent_id']);
	_myentities_parent= _all_myentitiesdset.getColumnAsArray(1);
	
	//now that we have the array of the children, we concanate it with the first array
	globals._app__aMy_entitesIDs= globals._app__aMy_entitesIDs.concat(_myentities_parent);
	
	databaseManager.removeTableFilterParam('my_db','myglobfilterparent');
}

...some other code with no interest

var _result = databaseManager.addTableFilterParam('my_db', null,'ent_id','IN',globals._app__aMy_entitesIDs,'myglobfilterent')

By killing the first filter and applying a new one, it seems that my first ‘_filtered_entfs’ is not replaced as I thought it should be through the tablefilterparam. As I see it, I’m now getting two foundsets in one, is that clear enough ?

Thank you