What is the default input to the get()?

#1

what is the default input to the get()

0 Likes

#2

the default input is the id field.

0 Likes

#3

Some clarification on this:

When called as a static function, Persistable.get has one required parameter: this, which should be an instance of the type.

Persistable.get is a member function, so when called on an instance, no arguments are necessary—the function will be called using the instance as its context (this).

There may be some confusion about why you can pass an id to Persistable.get, and that is because there is a special C3 Type System feature that will automatically convert a string to an object where an object is expected when making objects (JavaScript only) and when calling functions (all languages). See this post for more details

0 Likes