Changeset 8889
- Timestamp:
- 04/29/08 16:43:36 (5 months ago)
- Files:
-
- sandbox/minibase/trunk/demo/model.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/minibase/trunk/demo/model.js
r8886 r8889 15 15 } 16 16 17 // the Storable wrapper handles property access and adds 18 // the following instance methods: 19 // * save() - save the instance in the associated store 20 // * remove() - remove the instance in the associated store 17 21 return new db.Storable(this, properties || {}); 18 22 } 19 23 20 // init store instance and register persistent classes 24 // init store instance and register persistent classes. 21 25 db.store = db.store || new db.Store("db"); 26 // The call to registerType installs the following static 27 // methods in the constructor: 28 // * get(id) - get a persistent object of this type by id 29 // * all() - get an array containing all objects of this type 30 // * filter() - not yet implemented 22 31 db.store.registerType(Book);