tenwit wrote:
Looks like you haven't got a persister for Int64. In fact, the {g.memberId} (I'm assuming that there's really a "}" in there) looks odd to me: isn't {} notation for retrieving entire objects? Don't you want addScalar("memberId", Hibernate.LONG), or whatever the NHibernate equivalent is?
In fact any example of NH SQL query returning scalar would save me.
Continuing to figure ho to make it. I tryed the AddScalar method, but still have an exception of missing persiter.
Code:
session.CreateSQLQuery("select distinct memberId from GxUserInGroup where masterGroupId in (1,2,3,4)").AddScalar("memberId", NHibernateUtil.Int64).List();
Code:
"No persister for: System.Int64, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" "No persister for: System.Int64, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" string
But it's a NHibernates build-in type. So should I create persister for it? Unfortunatelly there is nodocs on this topic. And I can't even gogle any example use of SQL query returning scalar.