Showing results for 
Show  only  | Search instead for 
Did you mean: 

No longer able to easily lookup entity relationships in DQL as per the documentation


In the DQL documentation (here), it says that to find all the relationships of an entity, you can just use a command like this:

describe dt.entity.service_instance
| filter in(data_types, "RELATIONSHIP")


And this used to work just a few months ago (I even have a similar query saved in an old Notebook of mine that I would use as a template to quickly look up relationships for entities).  But as of at least this week (and who knows how long ago really since I hadn't tried using it in at least a couple of months), this query no longer works because there is no longer a data_types field called RELATIONSHIP.  All the fields that used to have a data_types value of RELATIONSHIP now have a value of record.


Now, good news is that by just swapping RELATIONSHIP with record in that query does seem to get you all of the relationships for an entity.  However, not all of the fields it returns seem to be relationships.  For example, if you describe record data_types, you do get relationship fields like "belongs_to", "called_by", and "runs", but you also get fields like "logSourceState", "logPathLastUpdate", "icon", and "additionalSystemInfo" which, unless I'm mistaken, are not relationships.


So, was this a mistake?  Do you guys plan to change relationship fields back to have a data_types value of RELATIONSHIP?  If not, please reconsider, as this made it super easy to find relationships (and only relationships) of an entity.  However, if this is a permanent change, please update the documentation to whatever is the new best way to list all the relationships of an entity.  Hopefully there's a way to do it other than looking for record data_types...


Featured Posts