Hello
I tried the 10.4.3. Application version checking
shown here:
http://www.hibernate.org/hib_docs/nhibe ... ansactions .
My complete code looks like this:
Code:
Configuration cfg = new Configuration();
cfg.AddAssembly("NHibernateTests");
ISessionFactory factory = cfg.BuildSessionFactory();
ISession session = factory.OpenSession();
ITransaction trans = session.BeginTransaction();
User test = session.Load<User>("joe_cool");
int oldvers = test.VVersion;
test.EmailAddress = "newMail2222";
session.Load(test, test.Id); <<<<<<<<Exception
In the last line an MappingException is thrown:
"Unknown entity class: CProxyTypeNHibernate_TestsUserNHibernate_Tests_NHibernate_ProxyINHibernateProxy1"
Where is my mistake?
/edit:
- The mapping file is correct. Saving a "user" works fine.
- Closing/disposing the session and using a new results in the same exception
Hibernate version: 1.2.1.GA
Full stack trace of any exception that occurs:
at NHibernate.Impl.SessionFactoryImpl.GetEntityPersister(Type theClass)
at NHibernate.Impl.SessionImpl.GetClassPersister(Type theClass)
at NHibernate.Impl.SessionImpl.DoLoad(Type theClass, Object id, Object optionalObject, LockMode lockMode, Boolean checkDeleted)
at NHibernate.Impl.SessionImpl.DoLoadByObject(Object obj, Object id, LockMode lockMode)
at NHibernate.Impl.SessionImpl.Load(Object obj, Object id)
at NHibernate_Tests.Program.Main(String[] args) in [...]NHibernate Tests\NHibernate Tests\Program.cs:line 37
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()