Hi guys..
I have a entity at my model that has about 30 properties mapped with a table
in database and in the entity I have a boolean field called "Enabled".
In my repository, I have a method to Able a entity, so my code is something
like this:
public bool EnAbled(long id)
{
var entity = this.Session.Get<T>(id);
if (entity != null)
{
entity.Enabled = !entity.Enabled;
this.Session.SaveOrUpdate(entity);
return true;
}
return false;
}
By the way, this code works fine, but when I exec with NHProf, I saw that
NHibernate exec a update command for all properties of my entity.
Is there any way to do it execute a update command for only necessary
properties (at this case, Enabled property) ?
Thanks for all
Cheers
PS: Sorry for my English
--
______________________________________
Felipe B. Oriani
[email protected] | www.felipeoriani.com.br
"...Trabalhe quanto puder, tornando-se útil quanto possível..." , por André
Luiz
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.