Re: Relation null??

From: Michael Gentry (Yes, I'm a Contractor) ("Michael)
Date: Wed Jun 29 2005 - 13:29:51 EDT

  • Next message: Dhruti Ramani: "Re: Many to Many Relation"

    I think it's because "personnel" is spelled "personel" ...

    (I'll go run and hide now)

    > From: Mike Kienenberger <mkienen..laska.net>
    > Reply-To: <cayenne-use..bjectstyle.org>
    > Date: Wed, 29 Jun 2005 11:52:02 -0400
    > To: <cayenne-use..bjectstyle.org>
    > Cc: <cayenne-use..bjectstyle.org>
    > Subject: Re: Relation null??
    >
    > Emre Yilmaz <emre.yilma..tr.com.tr> wrote:
    >> I want to set a table relation to null but I couldn't do this i get an
    >> Exception of nullpointer. How can I set a table relation null or like
    > null.
    >> My code is here;
    >>
    >> Visitor visitor = getPersonel(identNo);
    >> Visitor visitor2 = getPersonelByCardNo(cardNo);
    >> if(visitor2==visitor){
    >> visitor2.setCardRel(null);
    >> }else if(visitor2!=null){
    >> visitor2.setCardRel(null);
    >> }else if(visitor!=null){
    >> visitor.setCardRel(null);
    >> }
    >>
    >> java.lang.NullPointerException
    >
    > What's the next line of the stack trace?
    >
    > The problem isn't setting the relationship null -- it's probably that
    > visitor or visitor2 is null, and you're trying to perform a method on a null
    > object.
    >
    > -Mike



    This archive was generated by hypermail 2.0.0 : Wed Jun 29 2005 - 13:29:58 EDT