Using a recursive select but encountered a broken reference

63 views
Skip to first unread message

Carlos Cesar Caballero Díaz

unread,
May 22, 2019, 11:41:06 AM5/22/19
to web...@googlegroups.com
Hi guys, I have some weird issue here, I have a "Using a recursive
select but encountered a broken reference" error in a field wish seems
to have a valid reference. This is happening with a very specific record
in a MySQL database.

Any Idea?

Greetings.

Leonel Câmara

unread,
May 22, 2019, 11:51:41 AM5/22/19
to web2py-users
Are you using common filters?

Carlos Cesar Caballero Díaz

unread,
May 22, 2019, 12:14:34 PM5/22/19
to web...@googlegroups.com

No, I have just found the issue, I am using record versioning in tables, and the child record was removed, this does not trigered the cascade, so, the parent record was not removed and the recursive select was failing when tries to access to a "deleted" record.

Greetings.

El 22/5/19 a las 11:51 a.m., Leonel Câmara escribió:
Are you using common filters?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/d2596552-b707-4b80-8688-2ceedabbea51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Leonel Câmara

unread,
May 23, 2019, 7:29:19 AM5/23/19
to web2py-users
So you're indeed using common filters because that's how record versioning is implemented. In this case you can solve it by removing the reference before deleting, however if you still want to be able to see the deleted record on the one referencing it you can set the versioned table _common_filter to None when you get the record referencing it.
Reply all
Reply to author
Forward
0 new messages