Dave.
-----Original Message-----
From: castle-pro...@googlegroups.com
[mailto:castle-pro...@googlegroups.com] On Behalf Of Hamilton
Verissimo
Sent: 27 April 2007 18:43
To: castle-pro...@googlegroups.com
Subject: Re: ActiveRecord and validation
On 4/27/07, DaveG <d...@albany.co.uk> wrote:
> Nhibernate says that after an exception you shouldn't flush the
> session, but the current ActiveRecord code does in both
> ActiveRecordBase and in AbstractScope.
You mean AR knows an exception happened and invokes Flush anyway?
Email disclaimer:
The information contained in this e-mail is confidential and may be legally privileged. If you are not the intended recipient, please do not read, copy, disclose or otherwise use it. Please notify the sender of the delivery error by return e-mail and delete it and all copies from your system. Internet communications cannot be guaranteed to be timely, secure, or error free. Any views or opinions expressed in this e-mail are those of the author only and Albany Software Limited does not accept any liability for its contents, errors or omissions. Registered in England & Wales No: 2366012
--
Cheers,
hamilton verissimo
ham...@castlestronghold.com
http://www.castlestronghold.com/
If the session is in a scope the flush isn't done here but the scope
still flushes later.
What we could do is, on the catch, notify the scope that an error
occurred, so it might decide what to do (flush it or not). As
NHibernate does not cooperate on informing us about exceptions that
cause the session to be stalled, we might have to find a work around.
Do you want to see what I've done so far? If so what's the best way to
send a work in progress? Does Google Groups cope with attachments?
Dave.
-----Original Message-----
From: castle-pro...@googlegroups.com
[mailto:castle-pro...@googlegroups.com] On Behalf Of Hamilton
Verissimo
Sent: 30 April 2007 13:13
To: castle-pro...@googlegroups.com
Subject: Re: ActiveRecord and validation
Ok, but this is more a side effect. It depends on the behavior of the
Scope in place. It's not essentially wrong.
What we could do is, on the catch, notify the scope that an error
occurred, so it might decide what to do (flush it or not). As NHibernate
does not cooperate on informing us about exceptions that cause the
session to be stalled, we might have to find a work around.
Email disclaimer:
Thanks
On 4/30/07, David N. Godfrey <d...@albany.co.uk> wrote:
>
It is not finished as it still calls session.clear, and I've only looked
at .net2.
Dave.
-----Original Message-----
From: castle-pro...@googlegroups.com
[mailto:castle-pro...@googlegroups.com] On Behalf Of Hamilton
Verissimo
Sent: 30 April 2007 17:45
To: castle-pro...@googlegroups.com
Subject: Re: ActiveRecord and validation
Yep, a patch as a zip file is the best approach.
Thanks
On 4/30/07, David N. Godfrey <d...@albany.co.uk> wrote:
>
> Does this mean that we need to wrap a currently non-scoped session
> with some sort of scope so we can handle the exceptions in the same
> way? Or do you see the SessionFactory handling it directly. I suppose
> it could maintain a list of sessions with exceptions and decide
> whether to flush or not when ReleaseSession is called.
>
> Do you want to see what I've done so far? If so what's the best way to
> send a work in progress? Does Google Groups cope with attachments?
>
> Dave.
>
"The file ActiveRecord\Castle.ActiveRecord.Tests\Validators\ValidatorTestCase.cs
was found twice!?!
This usually happens if you applied a patchfile to the
wrong folder!"
Can you, well, check again the patch? Thanks
About the rest of the patch, it looks neat. I'm not sure you need the
ARValidationRegistry, though. We could use the default validation
registry, as long as we have just one instance per AppDomain for best
performance...