You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by b....@valbosoft.com on 2003/03/02 18:27:48 UTC

Torque generation question...

Hi,

Can anybody explain the following code generation in Torque:

    protected TjdtLicitante copyInto(TjdtLicitante copyObj) throws
TorqueException
    {
        copyObj.setCif(cif);

  copyObj.setNew(false);
      copyObj.setNew(true);

                      copyObj.setCif(0);
                    return copyObj;
    }

1- First it sets setNew to false and then to new,
2- The field we just copied (cif) is then set to zero..

Is there any explanation for this?

Cheers,
Bo



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: Torque generation question...

Posted by Benito Joel Garces Rodriguez <bg...@itweb.com.mx>.
Well, the secod thing I can answer

2- The field we just copied (cif) is then set to zero..

First, the torque generetor copy all the items in the new Object...

but, I suppose that the "cif" is the primary key, so, we can?t have two
objects
whith the same primary key.

The torque generator put zero in all primary keys that the class has.



-----Original Message-----
From: b.v.weert@valbosoft.com [mailto:b.v.weert@valbosoft.com]
Sent: Sunday, March 02, 2003 11:28 AM
To: turbine-user@jakarta.apache.org
Subject: Torque generation question...


Hi,

Can anybody explain the following code generation in Torque:

    protected TjdtLicitante copyInto(TjdtLicitante copyObj) throws
TorqueException
    {
        copyObj.setCif(cif);

  copyObj.setNew(false);
      copyObj.setNew(true);

                      copyObj.setCif(0);
                    return copyObj;
    }

1- First it sets setNew to false and then to new,
2- The field we just copied (cif) is then set to zero..

Is there any explanation for this?

Cheers,
Bo



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org