SubTables - not available and cannot be added as a nested subtable in the Query Builder

Wappler v5.5.1; MacOS, NodeJS, Local Node Web Server

Hi,

Since the upgrade to Wappler v5.5.1, a couple of database tables user_data and user_roles are not appearing in the tables list in the Query Builder.

As these tables have a foreign key set to the main table user, these appear as subtables under user table. However, when I add these tables as nested tables in the Query Builder, the API action doesn’t show that any change has been made. Even if I save the API, when re-opened, the nested subtables do not appear as having been added to the columns.

The only reason I can think of for this issue is that the column names that have been set as foreign keys between the master table user and subtables user_data and user_roles do not match.

Has this behaviour changed in the latest version or recently? This is an old project and was setup before the concept of master and nested tables was introduced in the Query Builder. I have started work on a new integration and I can’t find out any way to get past this issue.

Any advice on how this issue can be resolved is greatly appreciated.

The subtables behavior haven’t changed recently.

You should be able to see your subtables in the query builder.

Maybe add some screenshots and structure of your tables to illustrate the problem.

Hi George,

The two subtables data and role are correctly appearing under the master table user. There are two areas where this is not working. The database is MSSQL.

  1. After I add these tables as nested tables, the API doesn’t show it has been changed and needs to be saved. Even if I save it, re-open the API, the subtables no longer appear as nested tables under columns.
  2. Both of these tables also do not appear in the database list under Query Builder. So, I can’t add these tables as joined tables either.

Try giving the tables different aliases to see if that fixes things.

Hi Ken, tried giving different aliases to the nested tables - no luck. I also tried making other changes in the API with different aliases before saving; the nested tables still do not save/appear in the selected columns when API is re-opened.

The tables also don’t appear in the database tables list, so not sure what is the issue.

Hi @guptast,

I’m not experienced on suggesting db handling or query building but I have noticed that wappler is kind of sensitive on subtable inserting /modifying when it comes complex and massive…
I ended up creating 1 subtable at a time save db changes, check the changes log and my db manager if the changes have indeed applied and then keep on making more changes 1 at a time.
So, I would suggest

  1. Refresh schema on each table and subtable you have problem with
  2. Check your changes log
  3. Close your project
  4. Close wappler
  5. Reopen wappler
  6. Reopen your project
    Check if it works now as it should be…

Hi @famousmag,

Thanks for the tips to troubleshoot any issues with the subtables. In this case, I’m using MSSQL database, which is managed externally to Wappler. I have tried your tips and various other ways, but none of these methods have worked so far.

1 Like