You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 entityuser=entityNew("User");// Count all the users in the databaseusersFound=user.count();// create a new user entity and pre-populate it with datacoolUser=user.new({firstName="Luis",lastName="Majano",Awesome=true});// save the user objectcoolUser.save();// Retrieve a user with an ID of 123luis=user.get("123");