Oh OK, I had misunderstood your previous message.

I've just created the proposal here : http://216.121.112.228/browse/NH-2455

Mike



On 9 déc, 23:57, Fabio Maulo <[email protected]> wrote:
> Please attach a patch of your proposal, without Postsharp implementation,
> and we can review/discuss changes in the issue ticket.
> Thanks.
>
> --
> Fabio Maulo
>
> El 09/12/2010, a las 14:41, Michael <[email protected]> escribió:
>
> I've just finished changing NH's code base to implement several null
> checks on INHibernateProxy.HibernateLazyInitializer, and I don't have
> any failing tests in the NH tests suite.
>
> I've changed an application I'm writing, to now use static proxies
> instead of dynamic proxies with Castle, and all seems to work well.
>
> That sounds like a good idea to add more responsibilities to the
> bytecode provider. But actually, I don't know how all this stuff
> works.
> Would you have any advices on the interfaces / classes I should look
> at, in order to implement the changes you may think about?
>
> Thanks
>
> On 9 déc, 17:28, Fabio Maulo <[email protected]> wrote:
>
> You don't have to implement INHibernateProxy in all entities because that
>
> interface is for DynamicProxy.
>
> Perhaps is the time to refactorize all these stuff and relay
>
> more responsibilities to the bytecodeprovider.
>
> Please attach a patch of your proposal, without Postsharp implementation,
>
> and we can review/discuss changes in the issue ticket.
>
> On Tue, Dec 7, 2010 at 11:11 AM, Michael <[email protected]> wrote:
>
> Hello all,
>
> I've ported to PostSharp 2 and NH3 the bits ayende used to write, to
>
> use static proxies for the entities, instead of dynamic with Castle or
>
> LinFu.
>
> I was hopping not to have to modify the source code of NH, but
>
> unfortunately I can't make the static proxies work without.
>
> All the entities implement the INHibernateProxy interface, whether
>
> they are proxied or not. The difference between a proxied entity and a
>
> normal entity consists on the NHibernateLazyInitializer, which is null
>
> in the latter case, and not null in the former.
>
> The problem I have is that in NH's code base, there are some checks on
>
> the "proxyness" of an entity which rely only on the entity
>
> implementing INHibernateProxy. This makes NH thinks that all the
>
> entities are proxied, and leads to errors.
>
> Ayende solved this problem with a few changes in NH's code base. I
>
> thought I could avoid that, with the recent changes concerning the
>
> decoupling from NH to the proxy part, but unfortunately I can't.
>
> How should I fix that properly? Do I have to modify NH's bits?
>
> Thanks in advance
>
> Mike
>
> --
>
> Fabio Maulo

Reply via email to