db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vitzethum, Daniel" <Daniel.Vitzet...@gigatronik.com>
Subject Saving associated objects
Date Wed, 08 Dec 2004 13:39:25 GMT
Hello list,

one more question:

when saving, Torque's save methods just consider the associated
collections for saving, but not the single objects associated
by foreign key.

Some code:
---snip---
public void save(Connection con) throws TorqueException {
  (...)  
  if (collSomeObjects != null)
  {
    for (int i = 0; i < collSomeObjects.size(); i++)
    {
      ((SomeObject) collSomeObjects.get(i)).save(con);
    }
  }
  (...)
}
---snip---

But where is
---
  if (aOtherObject != null) {
    aOtherObject.save(son);
  }
---

Why that, and can I influence this behavior?


Daniel

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


Mime
View raw message