Hi,

  I have a table called Image with a field called data which is of type Blob. I 
noticed that the copy() of the Image object has something like (actually code 
below is that of copyInto() which is called by copy() )

{
          copyObj.setImageId(imageId);
          copyObj.setReferenceId(referenceId);
          copyObj.setData(data);

          copyObj.setImageId(0);


        return copyObj;
}

and setData() is like -

    public void setData(byte[] v)
    {

           if (!ObjectUtils.equals(this.data, v))
           {
            this.data = v;
            setModified(true);
           }


    }

Isn't this wrong? Coz if I do

Image X = Y.copy();

and then change the value of Y.data then the value of the X.data will also 
change! Since X.data and Y.data refer to the same byte[].

~Sarav

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to