Hi  

I have a doubt to update my last application* in production*.  I added a 
new many-to-one with a new object field to a old class, see:


*      <many-to-one name="PrecadastroPF" column="PRECADASTROPF_ID" 
 class="Light.BO.PrecadastroPF, Light" cascade="all"   unique="true" 
not-found="exception" />*

Method class:
     virtual public BO.PrecadastroPF PrecadastroPF
        {
            get
            {
          *      if (_PrecadastroPF == null)     <<<<<<<<<<<---- MARK01*
*                    _PrecadastroPF = new PrecadastroPF(this);*

                return _PrecadastroPF;
            }
            set
            {
                _PrecadastroPF = value;
                if (value != null)
                    _PrecadastroPF.Pessoa = this;
            }
        }



Please, note the MARK01,    I need to check if _PrecadastroPF is null why 
otherwise a exception is fired when I load a old object already persisted 
in database.

My doubt is:   Can I to check the _PrecadastroPF and init the object 
manually,  Is this a normal/correct approach to nhusers?    Is there any 
alternative for me don't require to check and create this object?



Best Regards

Sorry my English is not enough.   

   

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to