Skip to content
Jorge Reyes edited this page May 29, 2015 · 1 revision

You just use entityNew() like you would with any ORM entity and then just call our cool methods:

// get a new User entity
user = entityNew("User");
// Count all the users in the database
usersFound = user.count();

// create a new user entity and pre-populate it with data
coolUser = user.new( {firstName="Luis",lastName="Majano",Awesome=true} );
// save the user object
coolUser.save();

// Retrieve a user with an ID of 123
luis = user.get("123");
Clone this wiki locally