Session.InsertUpdate is unable to get a property when the assembly and the namespace are different...
Description
Environment
Attachments
Activity

quandary December 29, 2010 at 5:00 PM
Well, it just looks like I have to figure out how to build and debug and bugfix nhibernate myself.

quandary December 16, 2010 at 2:16 PM
No I haven't, but I will this weekend.

Stephen Bohlen December 13, 2010 at 11:34 AM
Have you attempted to reproduce this on a more limited basis using actual mapping files instead of the NHibernate.Mapping.Attributes approach? Its entirely possible that this is an issue with the NHMA Contrib project rather than with NH Core. You might consider cross-posting this issue here: https://nhibernate.jira.com/browse/NHMA as well.

quandary December 13, 2010 at 11:18 AM
I very much doubt that the mapping is incorrect, because it works perfectly when everything is in one single exe file. It's probably a bug in reflecting the class property, I'd presume probably because I use a namespace that starts otherwise than the assembly's default namespace. In a more condensed form, I put the problem up here before: http://stackoverflow.com/questions/4423050/nhibernate-exception-occurred-getter-of

Stephen Bohlen December 12, 2010 at 1:15 PM
Bug / Issue reports are better able to be handled/investigated if you provide a small sample project or code snippet(s)/mapping(s) that evidence your issue. Its impractical for the NH team to pick through so large a codebase as you have provided to attempt to identify this problem as part of a bug/issue report.
If you would like more general user support/assistance, consider posting this issue (after you have managed to distill it a bit) to the NHUSERS discussion list at http://groups.google.com/group/nhusers
Details
Details
Assignee
Reporter

I've a mailserver where I wanted to make a DB API for.
I've rewritten all the stored procedures in nHibernate, and tested them in project nhDBapi, where it works.
(see button 4 in nhDBapi)
I've then moved the project files into
api_nhibernate
which is the API for the mailserver.
the problem is when I try to set a DNS server in lsMailServerManager, it calls
lspr_UpdateSettings
but it doesn't find the property id in class clsSettings(.cs).
Since it works in the nhdbapi.exe, but doesn't work as dll, but I correctly changed the assembly name in the class name, it must be a bug in nhibernate.
Probably has something todo with the namespace. Please fix it, it's highly annoying.
Here's the exception, with stacktrace:
ex: Exception occurred getter of nhDBapi.DB.Tables.clsSettings.UID
bei NHibernate.Properties.BasicPropertyAccessor.BasicGetter.Get(Object target) in d:\CSharp\NH\nhibernate\src\NHibernate\Properties\BasicPropertyAccessor.cs:Zeile 211.
bei NHibernate.Tuple.Entity.AbstractEntityTuplizer.GetIdentifier(Object entity) in d:\CSharp\NH\nhibernate\src\NHibernate\Tuple\Entity\AbstractEntityTuplizer.cs:Zeile 139.
bei NHibernate.Persister.Entity.AbstractEntityPersister.GetIdentifier(Object obj, EntityMode entityMode) in d:\CSharp\NH\nhibernate\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs:Zeile 3837.
bei NHibernate.Persister.Entity.AbstractEntityPersister.IsTransient(Object entity, ISessionImplementor session) in d:\CSharp\NH\nhibernate\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs:Zeile 3629.
bei NHibernate.Engine.ForeignKeys.IsTransient(String entityName, Object entity, Nullable`1 assumed, ISessionImplementor session) in d:\CSharp\NH\nhibernate\src\NHibernate\Engine\ForeignKeys.cs:Zeile 193.
bei NHibernate.Event.Default.AbstractSaveEventListener.GetEntityState(Object entity, String entityName, EntityEntry entry, ISessionImplementor source) in d:\CSharp\NH\nhibernate\src\NHibernate\Event\Default\AbstractSaveEventListener.cs:Zeile 416.
bei NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.PerformSaveOrUpdate(SaveOrUpdateEvent event) in d:\CSharp\NH\nhibernate\src\NHibernate\Event\Default\DefaultSaveOrUpdateEventListener.cs:Zeile 64.
bei NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event) in d:\CSharp\NH\nhibernate\src\NHibernate\Event\Default\DefaultSaveOrUpdateEventListener.cs:Zeile 53.
bei NHibernate.Impl.SessionImpl.FireSaveOrUpdate(SaveOrUpdateEvent event) in d:\CSharp\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:Zeile 2615.
bei NHibernate.Impl.SessionImpl.SaveOrUpdate(String entityName, Object obj) in d:\CSharp\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:Zeile 547.
bei nhDBapi.DBaccess.InsertMe(clsSettings xxx) in C:\Users\Administrator\Desktop\MailServer_latest\MailServer\ServerAPI\API_nHibernate\API_nHibernate\cNhibernateDBaccess.cs:Zeile 264.
Project in question appended.
Because the mailserver is too big, I can't upload all files needed to reproduce the error.
But the mailserver you can find here:
http://www.lumisoft.ee/lswww/Download/Downloads/MailServer/Devel/Current/MailServer_devel.zip
The folder api_nhibernate belongs into this folder in the downloaded Devel version of the mailserver
MailServer_Devel\MailServer\ServerAPI
Any corrections here:
http://www.lumisoft.ee/Forum/default.aspx?g=posts&m=3327&#post3327