Frequently Asked Questions

How do I store an Object in the Database?

Once your database is up and running, you can simply create your object as normal - then send it the message storeIn:

Person new
    surname:
'Smith';
    firstName: 'John';
    address: (Address firstLine: '4a Camden Square' postcode: 'NW3 2XZ');
    storeIn: aReStore

 

How do I change an Object in the Database?

Whenever you store or retrieve an object, ReStore will monitor changes to that object, and can automatically update its representation in the database - there is nothing extra for you to do. Additionally, ReStore provides a transactional model which allows you to 'batch' changes together - those changes can then be stored (committed) or forgotten (rolled back), as desired: 

aReStore beginTransaction.

self editOrCreateAnyNumberOfObjects.

(MessageBox confirm: 'Save Changes?')
        ifTrue: [aReStore commitTransaction]
        ifFalse: [aReStore rollbackTransaction]

 

2003 Solutions Software Ltd.

 

Home | FAQ Index | Prev | Next