DatabaseResource.fetch

Builds and executes a select SQL statement and sets the value of mapped form fields with column values retrieved from the database. This method is designed to be used to read a single database row. If multiple rows are returned by the database, only the last row retrieved will be returned to the form. To read multiple records, first create a table, then use the Table#fetchTable() method.

If any of the resource fields in the Database Resource is marked as required but has no value, a FormRuntimeException is thrown.

Further documentation.

returns int