Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // create Jedi class
- classes.Jedi = class Jedi extends ODM {};
- // import Jedi documents
- db.import('Jedi', '{\"luke\":{\"firstName\":\"Luke\",\"lastName\":\"Skywalker\",\"_id\":\"luke\"}}');
- // access the created instance
- instances.luke.firstName;
- // => 'Luke'
Add Comment
Please, Sign In to add comment