Merge lp://staging/~alhashash/openobject-server/v7_fix_check_recursion_bug_1131653 into lp://staging/openobject-server/7.0
Proposed by
Mohammad Alhashash
Status: | Needs review |
---|---|
Proposed branch: | lp://staging/~alhashash/openobject-server/v7_fix_check_recursion_bug_1131653 |
Merge into: | lp://staging/openobject-server/7.0 |
Diff against target: |
37 lines (+18/-9) 1 file modified
openerp/osv/orm.py (+18/-9) |
To merge this branch: | bzr merge lp://staging/~alhashash/openobject-server/v7_fix_check_recursion_bug_1131653 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email:
|
Description of the change
Using simple recursive Common Table Expression to check recursion directly in the database instead of complex loops and object traversal in python.
The recursive part uses a join instead of subquery as it leads to a much better query plan.
I do not know what is target minimum PostgreSQL version but CTEs require at least PostgreSQL v8.4.
Regards,
Mohammad Alhashash
To post a comment you must log in.
Unmerged revisions
- 5013. By Mohammad Alhashash
-
Simplify sql query
- 5012. By Mohammad Alhashash
-
Use add is cycle field to use UNION ALL for better performance.
- 5011. By Mohammad Alhashash
-
Fix bug lp:1131653 _check_recursion gives false positive if ids include a parent/child pair