Trying to redesign databases with new features

I’m trying out the new database manager features but I am struggling to work out the best practice for the new design for example if I was to set up a blogging site

Would I be linking them like Users > Blogs > Comments
Where Users is a normal table, blogs is a sub table and then comments needs 2 references one to the blog id another to the user id so if either are deleted the comment would be deleted so maybe a multi reference was my first though?

But when trying to use multi references on sub tables they throw errors like:

I’m not sure if this is a bug or because I’m misunderstanding the best practices of this feature.

Just to add the coms multi relation was just a test with another normal table when applying changes this works with no error but trying to add the comments multi relation throws the error.

Are you trying to do a Blog as a Service? Where users can create their own blogs?

Can’t help you on this feature, just asking the question because it’s not entirely clear

Did you enter all three tables as new in one go?

Seems your blog comments table is linked to the wrong blog table and not user blogs

You can switch to advanced mode and checks the linking

I added each one separate I added a table saved added another saved etc it seems to have issues with the sub tables

I actually couldn’t even add the comments multi reference as it throws the error the screen shot was taken before save

@George Starting to think this maybe a bug here I’m seeing a few things happening

  1. The fields aren’t showing until I hit basic then go back to advanced
  2. The relation wasn’t properly filled which I only saw after figuring out going back to basic then advanced revealed the relation.

I think i was able to recreate this - maybe refreshing needs improvements @George

As for the relations not being set correctly - i am not able to recreate this locally. What database are you using?

This was Postgres with version 11.1.x my first time trying Postgres out so maybe I did something wrong?

This looks like its something to do with sub tables I tried using normal tables and then after a subtable and a normal table in this clip the first one was 2 normal and both relations are filled the second one 1 is filled:

Yes that is how it is supposed to be, relations fields are shown only in advanced mode.

Will check for the right table setup initial. But you can always change them manually in advanced mode

Just to add here I setup a sub table and then in that sub table made a multi reference, unfortunately I can't insert any data into the multi reference even if I use the view table in the database manager. If I have the multi reference in a normal table no issues maybe related to the above with the fields not filling out when created in some way or something to do with how the sub table is recognised in the insert steps and manager?

Apologies if I'm using this all wrong can multi references be used in subtables? Subtables seem to be the route of a few issues im having atm while looking into this new setup it could all be my misunderstanding of how this works @George

Think I have narrowed down the data issue to the Fetch Data running it seems to freeze up the tab of the multi reference:

Seems if I add a incrementing Id field to the multi reference in a sub table then fetch data starts to work again

I can confirm the issue of the relations not been filled is working in 4.8.0 however the last part about the multi relations in subtables retrieving data without an incrementing field still exists

Edit: seems even two normal tables have this issue but as soon as I add an incrementing id fields the data starts to appear and let me add new etc

Fixed now in Wappler 4.8.1

This topic was automatically closed after 24 hours. New replies are no longer allowed.