I found a workaround, maybe that’s how Cuba requires it to be done, you tell me.
In the doc about extending a screen, there is an example of adding an attribute (the most simple), but not a relationwhich requires to override the Datasource of the screen.
Even if this is mentionned in the long list of rules at the beginning of the page this is worth of an example, because while searching here an answer I’ve seen other people struggling with this case.
So the solution is to override the Datasource in the screen using the same name “userDs” than the one inherited, but you cannot do it in Studio, or only the half.
Screenshots below : I tried to change the class from User to ExtUser (which extends User with an additional ‘tenants’ relation). This will make possible to create a nestedDs for the new relation.
Then Studio renames the DS as “extUserDs” => inherited userDs will not be overriden, so you have to go edit the XML and set “userDs” yourself.
There is some kind of inconsistency. I have extended FileDescriptor in another project and this is transparent : you declare a Datasource<FileDescriptor> in your screens, and you have in fact a Datasource<ExtFileDescriptor>, meaning you can downcast entities with no issue. This should be the same here.