This is a important addition especially to solve performance issues while being able to write efficient dynamic HQL queries. But, how do we modify the HQL transformer in case of loading a specific parent or another mapped entity property.
session.createQuery(
"select st.stNumber as stNumber, st.stDate as stDate "
+ " from SomeTable st "...
suppose in an entity there are attributes id, username, age, address. Now I just want id and username and I use this code for it.
Projections enable the returning of something other than a list of entities from a query.
var proj = Projections.ProjectionList()
.Add(Projections.Property("Id"), "Id")
.Add(Projections.Property("Use...
Hello all,
consider these POCOs:
class Foo {
int Id {get;set;}
string Name {get;set;}
}
class Bar {
int Id {get;set;}
string PropA {get;set;}
Foo PropB {get;set;}
}
Now what i want to achieve is using an ISQLQuery with a root entity of Bar to also hydrate the PropB property.
ISQLQuery barsAround = nhSes.CreateSQLQuery("s...