Helma Logo
main list history

Version 3 by hannes on 09. November 2005, 12:15

1(brainstorming)Defining collections in code rather than in type.properties:
13Defining object/relational mapping in code rather than in type.properties
14

Version 2 by hannes on 17. September 2005, 00:05

1(brainstorming)
2

Version 1 by hannes on 17. September 2005, 00:04

1 StoryController = {
2    edit_action: function() {
3        var stories = Story.collection({filter: "x = 'bar'",
4                                        accessname: "dongle",
5                                        order: "MOOPAD"});
6        var story = stories.get(req.form.id);
7        story.name = req.form.name;
8    }
9 }
10 
11 Story.mapping = {
12    id: "id",
13    name: "name",
14    author: User.reference("author_id"),
15    comments: Comment.collection({local: "id"; foreign: "story_id"})
16 }