Investigated IInterceptor.Instantiate, where it is possible to instantiate a
constructor other than the default, however I still cannot solve my problem.
Reverting back to my entity example, I want to invoke the constructor:

public X(int p1, int p2)
{
         //Perform validation guard check against arguments
         this.m_Prop1 = p1;
         this.m_Prop2 = p2;
}

But is there any way of me instructing nhibernate to perform the following:

1.  Pass p1 value from database into ctor
2.  Pass p2 value from database into ctor

In the IInterceptor.Onload() method, the parameter object[] state contains
the state of the entity brought back from the database. Is there any way of
getting at this state at the moment in time when the
IInterceptor.Instantiate() method gets executed or does it not exist at this
stage?


On Wed, Oct 29, 2008 at 11:25 AM, Fabio Maulo <[EMAIL PROTECTED]> wrote:

> 2008/10/29 Billy Stack <[EMAIL PROTECTED]>
>
>>
>>  Is there any way to call the constructor that has the guard clauses?
>>
>
> ILifecycle.OnLoad invasive, old school
> IInterceptor.Instantiate in NH1.2
> IPostLoadEventListener or ILoadEventListener in NH2.0
> override PocoEntityTuplizer and create a specific IInstantiator NH2.1
>
> In each version step you can use also previous solutions.
>  --
> Fabio Maulo
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to