Imagine a data model... 

How can I find the unknown relations of Entity (when the data model is much bigger and you don't want to click all entities) ?

Now I'm making a dummy aggregate, select Entity and the tool shows me (as suggestions) exactly what I need...

But I think there should be a cleaner way...

Hi Bob,

This is going to be dependant on the type of database server running alongside your platform. For SQL Server, you can run this to find all tables referencing the table in question.

EXEC sp_fkeys 'TABLENAME'

You don't need direct access to the database either, this can be executed from within Service Studio. Here's an example for the User entity:

Note that this requires two things: an output structure with at least seven columns so all information is returned, and that you know the physical table name. You can find this last one by querying the Espace/Espace_Entity/Entity entities available:

Thanks for the answer.  But...  Uh ?  I was looking for a cleaner way.  Something like "Right-click the primary key and left-click the 'Linked by...' option" (which doesn't exist).  OS has the knowledge.  But it is not sharing it.  I think...

Bob Matthyssens wrote:

Thanks for the answer.  But...  Uh ?  I was looking for a cleaner way.  Something like "Right-click the primary key and left-click the 'Linked by...' option" (which doesn't exist).  OS has the knowledge.  But it is not sharing it.  I think...


This option is not available, but I also think that a "find where used as FK" function would be pretty useful.

Perhaps you can create an idea for it?

Solution

Bob Matthyssens wrote:

Thanks for the answer.  But...  Uh ?  I was looking for a cleaner way.  Something like "Right-click the primary key and left-click the 'Linked by...' option" (which doesn't exist).  OS has the knowledge.  But it is not sharing it.  I think...

I was going to reply that there isn't anything quite as... clean as this. :)

Then I opened a Diagram and right clicked an Entity:


"Show all entities that refer" looks right up your alley! Thank you for leading me to something new here, I can forget about that query...


Solution

Wow, didn't know about this feature too! o.O 

Thanks for sharing this Afonso!

I've been trying it out and it's useful, but it will only drag Entities that you're already referencing. If the data model you want to visualise is spread out across multiple modules and you're not consuming all the Entities that already reference that Entity, you won't have a complete picture. 

It's still very usable if you keep this in mind - you can create a test module, reference the entirety of the modules you want to visualise, and then right click.

Oh...  Is this happening ?  Right under my eyes ?  Thx, Alfonso !