Helma logo
helma.org » Home > Stories > HopObject.persist()

HopObject.persist()

Stores a transient HopObject and all HopObjects reachable from it to database.

The function returns the id (primary key) of the newly stored HopObject as string, or null if the HopObject couldn't be stored for some reason.

Syntax
HopObject.persist()

Example
var hobj = new HopObject();
hobj.foo = new HopObject();
res.debug(hobj.persist());
2
res.debug(hobj.foo._id)
3


... comment


Page last modified on 2005-03-10 12:47 by hns