Join two object link by a many-to-many relation in Workshop

Hello everyone,

I’m stuck on a problem in Workshop, and I’d like to know if you’ve already experienced this.
I have two objects that are linked by a many-to-many relationship.
Do you have a solution for displaying the join between the two tables in a one table object ?

One solution would be to perform this transformation in Code Repositories (or Pipeline Builder) and then create a new object, but we would lose the usefulness of having different objects..
Another solution is to create a function, but that won’t work because the table object will be linked to object 1, and the function will return more rows than those in object 1.

Any others ideas ?

Thanks :folded_hands:t4:

Could you define the link as an object type backed link in Ontology Manager, and then display that object type in the Workshop table? Then you should be able to display linked object columns from the objects on either side as needed.

Oh yes, I’ll try that, but it’s still a workaround.

I don’t understand why there isn’t a simpler way.

What do you think is the best practice for creating objects?

Let me give you an example:
We have three objects:
A Car object
A Supplier object
A Customer object
With links between them

You have a specific requirement:
You need to join the three with filters applied (e.g., car = Mercedes, etc.) and some new calculated fields, but these will be independent of the filters chosen by the user in Workshop.

For this case,
Would you try to reuse the existing objects, or would you rebuild a new dataset with code repositories and then create a new object?

I thought that having different objects allowed them to be reused and manipulated. But in practice, I have the impression that everything isn’t possible and that it’s easier than recreating a dataset.

What do you think?

I’m not clear what you’re trying to display. If you in the end want to display Cars, Suppliers, and Customers, then you do not need an object backed link. If you want to display say “Customer Cars” where customers can own multiple cars and cars can have multiple customer owners, then an object backed link type would allow you to do this.

Workshop loads data via objects data stored in the ontology so you need to model that data with object types if you want to load it in Workshop.

If you just want to display these three object types with the given filters on each object type then you should just need to filter on linked object properties for each object type.

Thanks for your feedback, but I still don’t quite understand whether I should go through existing objects or create a new object. I’ll show you a clearer case.

We already have two Object Types and a Linkt Type such that :

First Object Type : [Example] Car
(brand → primary key)

brand model year
mercedes class c 2012
audi a1 2015
bmw 325 2020

Second Object Type : [Example] Component
(part → primary key)

part price stock
rim 150 250
steering wheel 50 500
panoramic roof 60 800
heated seat 80 700

Link Type : [Example] Car[Example] Component (many-to-many)

brand part
mercedes rim
mercedes panoramic roof
mercedes heated seat
audi steering wheel
audi rim
bmw panoramic roof

The goal would be to have this on workshop in a single Object Table widget.
With some other colums : The last two columns are functions-backed property columns.

brand part model year price stock part_by_brand (2025-year)/stock
mercedes rim class c 2012 150 250 3 0.052
mercedes panoramic roof class c 2012 60 800 3 0.01625
mercedes heated seat class c 2012 80 700 3 0.01857
audi steering wheel a1 2015 50 500 2 0.02
audi rim a1 2015 150 250 2 0.04
bmw panoramic roof 325 2020 60 800 1 0.00625

Is it possible to filter on the last two columns? For example, I want the user to only see rows where (2025-year)/price is greater or equal than 0.02

brand part model year price stock part_by_brand (2025-year)/stock
mercedes rim class c 2012 150 250 3 0.052
audi steering wheel a1 2015 50 500 2 0.02
audi rim a1 2015 150 250 2 0.04

Your solution of defining the Link Type as an Object Type could solve the join problem, but to filter on function-backed property columns, I only see the solution of making a pipeline to generate a new dataset on Code Repositories or Pipeline Builder and then recreating an Object Type linked to this dataset.

Do you see any other solutions ?

Thanks for your help @evanj :folded_hands: