Question about the deleteObject call of DataContext

From: Joshua Pyle (joshua.t.pyl..mail.com)
Date: Wed Jan 12 2005 - 20:01:14 EST

  • Next message: Mike Kienenberger: "Re: Question about the deleteObject call of DataContext"

    I passed a null value to the deleteObject call of DataContext and got
    the following.

    CauseCd causeCdToDelete = null;
    this.dbContext.deleteObject(causeCdToDelete);

    Gave me.....

    java.lang.NullPointerException
    at org.objectstyle.cayenne.access.DataContext.deleteObject(DataContext.java:1008)
    at com.ray.rms.it.esolutions.mla.Model.test.deleteCauseCdExample(test.java:206)
    at com.ray.rms.it.esolutions.mla.Model.test.main(test.java:41)

    Its an easy work around but I was curious if others have seen this.
    Intuitively I would think that deleteObject would just ignore a null
    value.

    -- 
    Joshua T. Pyle
    Go has always existed.
    



    This archive was generated by hypermail 2.0.0 : Wed Jan 12 2005 - 20:01:16 EST