Please note: this project is inactive since early 2006

 
4.2 Inserting an object

As soon as an object is created, you should inform the EditingContext of its existence, so that, when instructed, it will be able to save it into the correct database. In fact, a brand new object should be inserted in an EditingContext as soon as you wish to establish some relationships with other objects.

To insert an object in an EditingContext, simply call 'insertObject()':

        >>> newBook=Book()
        >>> ec.insertObject(newBook)

Alternatively, you can use the method insert ; both insert and insertObject are completely equivalent, and depending on your own feeling you may prefer one or the other.

       >>> newBook=Book()
       >>> ec.insert(newBook)

Comments are welcome: Sebastien Bigaret / Modeling Home Page
Hosted by:SourceForge.net Logo