c# - Error "not an association id" in nhibernate -


i got following error message nhibernate:

{"not association: id"}

model.order orderalias = null; model.unit unitalias = null; 

query reproduce:

var query = m_hibernatesession.queryover<model.order>(() => orderalias)                     .joinalias(() => orderalias.id, () => unitalias, jointype.innerjoin)                     .transformusing(transformers.distinctrootentity)                     .orderby(x => x.ponumber).desc.take(5); 

(for db model here: nhibernate criteria selecting different tables)

what mean , how can correctly retrieve result list?

thx

in model.order class, id should of type model.unit.

make sure have classes both model.order , model.unit


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -