Hi Alexander,
If you detail table is in another view, in that bind the context of second entity to the view using below code:
sap.ui.getCore().getModel("ModelName").createBindingContext("/SecondEntitySet((GENKEY=2,NUM_LINE='000000004'),
function(oContext) {
oView.setBindingContext(oContext);
}
oView is the view instance.
Hope this helps.