John,
I would love to do that, but I don't know what code would be helpful here.
All of it is quite trivial really. As far as the exception it is also quite
uninformative, here it is:
System.NullReferenceException was caught
Message="Object reference not set to an instance of an object."
Source="uNhAddIns.Adapters.Common"
StackTrace:
at
uNhAddIns.Adapters.Common.AbstractConversationInterceptor.DisposeConversationOnException()
in c:\Documents and
Settings\HP_Administrator\Desktop\uNHAddins\uNhAddIns\uNhAddIns.Adapters.Common\AbstractConversationInterceptor.cs:line
156
at
uNhAddIns.CastleAdapters.AutomaticConversationManagement.ConversationInterceptor.Intercept(IInvocation
invocation) in c:\Documents and
Settings\HP_Administrator\Desktop\uNHAddins\uNhAddIns\uNhAddIns.CastleAdapters\AutomaticConversationManagement\ConversationInterceptor.cs:line
46
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at IJobDalProxy3e9a670be6024191b1818851699434af.AcceptAll()
at TEAMSLogic.Impl.JobLogic.AcceptAll() in
C:\Source\TEAMS\TEAMS\TEAMSLogic\Impl\JobLogic.cs:line 321
at TEAMS.Manager_Forms.frmJobManager.btnSave_Click(Object sender,
EventArgs e) in
C:\Source\TEAMS\TEAMS\TEAMS\Manager_Forms\frmJobManager.cs:line 382
I have been able to reproduce this error using unit tests if I try and do an
accept all and one of the weight factors in my job details is a duplicate of
another in the db. Unfortunately the way I have to do things I don't know
about the duplicate until the save process and for NHibernate that is too
late. However I also get this error when I use a non duplicate weight
factor, but I can't reproduce that in unit tests, and I have simply ran out
of time. Either way this exception is entirely non informative, at least to
me anyways.
Thanks,
Josh
On Thu, Jul 2, 2009 at 8:12 AM, John Rayner <[email protected]>wrote:
>
> Josh,
>
> Some code and a copy of the exception message would allow everyone to
> help you better.
>
> Cheers,
> John
>
> On Jul 2, 5:34 am, jobsamuel <[email protected]> wrote:
> > I thought that since you are using db generated identity, your save
> > would result in a db call and your further call to criteria query
> > would work. Even if you are not using db generated id the session
> > would automatically flush upon a query and your criteria query should
> > still work. I think this is mentioned in the document that in flush
> > mode auto firing a query happens to be a flush point.
> > Is my understanding wrong, if it correct then your criteria query
> > should have worked, what is the reason for it to fail?
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---