Take the following query:
var q = DB.From<LRARisultato>()
.Join<LRARisultato, LRDRisultato>((aRisultato, dRisultato) => aRisultato.RisultatoId == dRisultato.Id)
.Where(x => x.AnalisiId == aIdAnalisi)
.OrderBy<LRARisultato>(x => x.Stato)
.ThenBy<LRDRisultato>(x => x.Ordine)
.ThenByDescending<LRARisultato>(x => x.DataOraEsecuzione);
The 2 tables LRARisultato
and LRDRisultato
have some columns in common.
This query, if executed as-is, it should output a List of LRARisultato.
It crashes instead with:
ambiguous column name: TIPOVALORE
The column TIPOVALORE
is in fact present on both tables, but I’m only asking for the fields of the first table, not the ones of the second one.
I have made a similar topic in the past, so i reinstate the question: Why does OrmLite not include table alias on every field in the SELECT list?
How can i trust an ORM in production that can’t build a query so simple?