I need a computer that accesses the instance of my relationship and returns a value from a logic

I have a service table with the relationship working normally with the images table. In the images table, the images are normally registered, it has an attribute called cover that when true, it would be the one that would return in the new computed cover attribute. But I don’t want to know that with Database Instancia. I was wondering if there is a way to access this.images (), I’ve tried it in a few ways and I haven’t been successful in any.
And that information has no really explanatory material in the documentation.