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
Post a Comment