El 13/02/17 a les 21:57, Ul ha escrit:
Am 09.02.2017 um 10:27 schrieb Ul:
Am 07.02.2017 um 18:57 schrieb Cédric Krier:

I do not understand what is this "filtering" problem.

The reason why I did see this problem with filtering was that I have
only very basic knowledge of SQL and I underestimated it's power.
After you stating that there is no problem I was reading more about SQL
and finally came across WITH RECURSIVE, that should do what i need.


Finally i have my tree out of a Many2Many Table using ModelSQL and
overriding table_querry() using WITH RECURSIVE.

For usual data it works fine.
But it doesn't work with a tree were one leaf or knot shows up two times
at 2 different places.
in this Case I get an Error in the Client: "You try to read records that
don't exist anymore."

I located the place were the error is triggered:
model/modelsql.py line 704 there is a check:
"if not len(fetchall) == len({}.fromkeys(sub_ids)):"
If i comment out the whole if clause or just the line calling the error
(line 717) it works fine.

How important is this check? How much do i risk if i leave this
error-call disabeled?



This check says that you requested data for X records but the query only returned Y. Normally it is used to ensure that the user is allowed to read all the records he is trying to access. But I believe that in your case there is something in your sql query that prevents to return the correct data.

Do you mind sharing the query? So we investigate further which is causing the error.



--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

--
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/351bf832-e63a-9efb-4513-fc0ea9b181f6%40koolpi.com.

Reply via email to