Changeset 8891

Show
Ignore:
Timestamp:
04/29/08 16:49:55 (4 months ago)
Author:
hannes
Message:

* Some more tweaking

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/minibase/trunk/demo/model.js

    r8890 r8891  
    1111function Book(properties) { 
    1212 
     13    // Define any instance methods you like, accessing persistent 
     14    // properties using the this prefix. 
    1315    this.getFullTitle = function() { 
    1416        return this.author + ": " + this.title; 
     
    1921      the following instance methods and properties: 
    2022 
    21        save()   - save the instance in the associated store 
    22        remove() - remove the instance in the associated store 
    23        _type    - the object type name - readonly 
    24        _id      - the object id - undefined for transient objects, 
     23       book.save()   - save the instance in the associated store 
     24       book.remove() - remove the instance in the associated store 
     25       book._type    - the object type name - readonly 
     26       book._id      - the object id - undefined for transient objects, 
    2527                  only settable if undefined 
    2628     */ 
     
    3436 methods in the constructor: 
    3537 
    36    get(id)  - get a persistent object of this type by id 
    37    all()    - get an array containing all objects of this type 
    38    filter() - not yet implemented 
     38   Book.get(id)  - get a persistent object of this type by id 
     39   Book.all()    - get an array containing all objects of this type 
     40   Book.filter() - not yet implemented 
    3941*/ 
    4042db.store.registerType(Book);