[uniapp-Temporary joint table query] SYNTAX_ERROR, no association between the main table and the secondary table was found. Note that when using temporary table joint query, only filtered fields will be used for joint tables.

Problem Description:

  • Text:
    SYNTAX_ERROR, No association between the main table and the secondary table was found. Note that when using temporary tables to join tables, only the filtered fields will be used to join the tables.

  • picture:
    Insert image description here

Key code:

Insert image description here
Insert image description hereNote: Where the horizontal line is drawn, the associated field of the student master table must be: category_id.

Solution: Official documentation

Add the fields associated with the foreign key of the main table
Insert image description here

Summarize:

When querying joint tables, they must be echoed back and forth.

In addition, you need to change the display field: (schema2code generates code, remember that all relevant pages must be changed.)
Insert image description here

Insert image description here
Insert image description here

Guess you like

Origin blog.csdn.net/zhinengxiong6/article/details/129722921