Skip to content

Commit

Permalink
Formatted readme slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
Zef Hemel committed Feb 5, 2010
1 parent e8bca97 commit c37c40d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Expand Up @@ -117,15 +117,15 @@ be persisted to the datase. All objects retrieved from the database
are automatically tracked for changes. New entities can be tracked to
be persisted using the `persistence.add` function:

var c = new Category({name: "Main category"});
persistence.add(c);
for ( var i = 0; i < 5; i++) {
var t = new Task();
t.name = 'Task ' + i;
t.done = i % 2 == 0;
t.category = c;
persistence.add(t);
}
var c = new Category({name: "Main category"});
persistence.add(c);
for ( var i = 0; i < 5; i++) {
var t = new Task();
t.name = 'Task ' + i;
t.done = i % 2 == 0;
t.category = c;
persistence.add(t);
}

All changes made to tracked objects can be flushed to the database by
using `persistence.flush`, which takes a transaction object and
Expand Down

0 comments on commit c37c40d

Please sign in to comment.