I have two entities based on two views. The mappings looks like this:
Entiy A:
In scenarios whithout explicit mapping between our entities, we can use only HQL.
Multiple classes may appear, resulting in a cartesian product or "cross" join.
from Formula, Parameter
from Formula as form, Parameter as param
So in the case above we would have HQL like this:
FROM SearchView AS sv, SearchInvoiceResourceLookUpView AS srf
WHERE srf.InvoiceId = sv.Id
AND srf.ResourceId = '[Inser resource id here]'
Also some SELECT should be used and maybe DTO with Result Transformer...