Estoy migrando una aplicación como ésta:Tipo NHibernate Expulsar Por ejemplo, en lugar de por
Vehicle v = null;
using (ISession session = MyNHibernateSession())
{
v = Vehicle.FindById(1);
}
using (ISession session = MyNHibernateSession())
{
// somwwhere into these4 lines Vehicle comes Finded
DoSomething();
DoSomething2();
DoSomething3();
DoSomething4();
DoSomething5();
DoSomething6();
// if i do this i get an error "another object with the same id etc etc etc
session.Update(v);
}
Me wa a hacer algo como esto:
session.EvictAllByType(typeof(Vehicle));
es posible? ¿cómo ?, gracias
Siempre puede hacer una 'session.Clear()' para limpiar la sesión. –
session.clear() borra todos los objetos de la sesión que necesito borrar solo objetos de tipo Vehicle, thanx – manuellt