Good evening everyone.
How wonderful I found this group!
I am a big fan of peewee.
My question is very specific and I think I will find the answer I want here:
I use a software here where it creates tables dynamically.
First it creates a table with the company data.
After creating it it uses the row ID to create the tables that will relate to this record. That's why I have trouble making the relationships in the queries.
I will try to represent it here below:
There is a table called Companies.
1 - Company with name X
2 - Company with name Y
3 - Company with name Z
Each time he creates a row in the Companies table he raw a table consisting of the id and other information as below:
Table Funcionarios1 (fields identical to the others)
Table Funcionarios2 (identical fields to the others)
Table Funcionarios3 (identical fields to the others)
Horrible, but I think this is done on purpose to make it more difficult.
My problem is to join the records of the Company table with the records of the tables Employees 1, 2, 3, n that he created.
How could I do this? Just so you know that this bank in this way was not my creation.
Translated with
www.DeepL.com/Translator (free version)