Skip to content
Advertisement

Peewee – Recursive CTEs – problem with the documentation example – OperationalError no such column: base.id

I have a problem with Peewee-3 and one of the tutorials in documentation: http://docs.peewee-orm.com/en/latest/peewee/querying.html#recursive-ctes

When I’m trying to run this code (nearly exact copy from doc) it’s rising an error:

Exception has occurred: OperationalError no such column: base.id

Here is my code (there is commented part with some testing categories):

JavaScript

What am I doing wrong and how can I fix it, there is an mistake in the documentation?

Advertisement

Answer

Thanks for the issue report. The problem is I omitted to select the category “id” in the example from the docs. The fix is quite simple:

JavaScript

I’ve updated the docs accordingly.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement