c# - NHibernate - "No row with the given identifier exists" but it is there -


i using nhibernate , error appears when use method of session.

this code:

public t getbyid(object id)     {         t entity;         entity = (t)reporthttpmodule.currentsession.get(typeof(t), id);         return entity;     } 

note don't error when use createcriteria(t) before calling method!

i've found solution. weird problem in mapping file. 1 of columns had not-null="true" in mapping file in database not nullable!


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -