I have a problem updating with a stateless session, and I wonder if anyone has seen this. (NHibernate 3.1).
I basically do the following:
SomeEntity e = statelessSession.Get<SomeEntity>(id); e.SomeProperty = "a new value"; statelessSession.Update(e);
and I get the following error:
NHibernate.MappingException: No persister for: Castle.Proxies.SomeEntityProxy at NHibernate.Impl.SessionFactoryImpl.GetEntityPersister(String entityName) at NHibernate.Impl.StatelessSessionImpl.GetEntityPersister(String entityName, Object obj) at NHibernate.Impl.StatelessSessionImpl.Update(String entityName, Object entity) at NHibernate.Impl.StatelessSessionImpl.Update(Object entity)
Display -
class SomeEntityMap : ClassMap<SomeEntity> { public SomeEntityMap() { Table("Some_Entity"); Id(x => x.ID).Column("ID"); Map(x => x.Name).Column("NAME"); }
I went through the debugger and see that statelessSession.Get (id) returns me a proxy. Is it true?
Does anyone know what the problem is? Please share your opinion and suggestion.
source share