Member function


A member function is equivalent to the instance method in Java. For example, User.get(‘user1’) is essentially User.make({id: "user1’’}).get(). The same applies to merge, upsert and other common member functions. You can invoke a member function directly on a Type, but you wiil need to pass the instance as the first argument (this). If you have an instance of a type User as variable user, and you want to change a field and merge it, you can do user.putField(‘name’, ‘myname’).merge().