Closed nhibernate-bot closed 6 years ago
What i want to get back is the entity
It's a duplicate of already resolved https://github.com/nhibernate/nhibernate-core/issues/948
@bahusoid can you provide example how to rewrite the query using the new feature? Then close the issue.
Since 5.1 you can use "entity projections" to retrieve particular entity from queries:
LeadTimeTemplate ltt = null;
var st5 = _nHibernateSession.QueryOver<UnitLeadTimeTemplate>()
.JoinAlias(ultt => ultt.LeadTimeTemplate, () => ltt)
.Where(ultt => ultt.Unit.Id == unitId)
.Select(x => ltt.AsEntity())
st5.List<LeadTimeTemplate>();
Duplicate of #948 (implemented in https://github.com/nhibernate/nhibernate-core/commit/f2969d0d198efd83c03b5993d0a516ebc0195325)
Taavi Kõosaar created an issue — :