I dropped the relations and imported the data with the relation fields as string.
I was then able to see the data in the data explorer.
I then re-instated the relations and data explorer then shoed no data.
So I dropped the relations again and then deleted the table.
After stopping and starting the system data explorer showed that the table no longer existed
I then recreated the table with relations
Data explorer showed the table with no records as expected
But what I do not understand is that when I preview my app I can see the stock records keyed against the products:
Are you using any computed attributes or fields that might contain an error? It’s possible that there’s a syntax issue in one of the computed attributes, or a value is being assigned to a field with an incompatible type.
Could you please double-check the data types of your Stock’s table attributes and ensure the values assigned to them are correct?
As I understand, when designing Qodly data model you have to think relation as link between entitySelection and entity (and not between PK and FK as in 4D data model)
So, in your table ‘Stock’ you should replace the ‘fk_wharehouse’ and ‘fk_product’ UUID fields
by ‘wharehouse’ and ‘product’ entity fields.
During the import process, once you map the columns of your data file to the corresponding attributes in your table, you’ll get a preview of how the data will appear:
If the import goes through without generating any error files, and the related entities (e.g., the fk_warehouse) is correctly referenced (usually by its UUID), you’ll be able to see the imported records in the Data Explorer:
Also, ensure the UUIDs assigned to entity-type fields (like fk_warehouse and fk_product) actually exist in their respective referenced tables. If they don’t, the related data won’t link properly, and the records may not show as expected in the Data Explorer.
Firtsly thank you for taking the time to do that video. I can confirm that everything you have shown is exactly what I have done, multiple times. The only step that never works is showing the data in the data explorer which just bugs out and displays no stock records.
When I delete the relations the data shows. In the app though the data displays and relates fine.
The one thing I did take from your last screenshot and another comment was that I was thinking of the relation as a storage property and trying to access fk_warehouse in my stock listing which simply crashes the data list it is put on with an oops message:
I realised I have to think about this differently and that if I want to access that value I have to use fk_warehouse.id (where id is the warehouse id property. Here is the result in product showing the stock from two warehouses where I am referencing fk_warehouse.name:
I am thinking that I may have to start the project from scratch???
In the process of trying to fix things I now see there are remnants of things that simply should not be there that the database engin is holding on to.
In the image you can see un-related relations that cannot be removed. I tried deleting bot the warehouse and product tables but when I added them back as new tables they cam back in before.
Even with no relation I cannon now change the data type of the warehouse relation. It has all just gone pair shaped and I am not sure f it is really worth pursuing. Maybe I will try again in 6 months…
HEK NO. listen, the moment project mode came out, i started hacking the 4d.catalog file. this is right in my wheelhouse/zone of temptation. i will break because i care.
This data explorer issue was identified during our discussion and has now been resolved.
It turned out to be a cache-related problem, which was fixed by clearing the local storage cache from the Application tab in the Data Explorer browser’s developer tools (Inspect).
Just sharing here in case it helps someone else facing the same issue. .