treebhoph wrote:
How should i do for this problem?
I think the problem is in your class.
Try this:
Mapping:
Code:
<class name="A">
<id name="Id" column="Id" type="Int32">
<generator class="native"/>
</id>
<property name="Name"/>
</class>
Class:Code:
public class A
{
private int _id;
public int Id
{
get { return _id; }
set { _id = value; }
}
private string _name;
public string Name
{
get { return _name; }
set { _name = value; }
}
}
Test:Code:
A a = new A();
int savedId;
using (ISession s = OpenSession())
{
s.Save(a);
savedId = a.Id;
s.Flush();
}
a = null;
using (ISession s = OpenSession())
{
a= s.Load<A>(savedId);
Assert.IsNull(a.Name);
}
The test work fine.
Please, after try it comment the NH-770 so we can close it.
Bye
P.S. Please, don't post JIRA more than one time.