This method inserts (or updates) the row on the database. You must set the primary key attributes on the component before calling store().
The store() method determines automatically whether to perform a SQL UPDATE or INSERT. If the component instance was loaded from the database (using method load()), the store() method attempts an UPDATE first, and if no rows are affected it executes an INSERT. If the component was instantiated explicitly (without using method load()) the store() method attempts an INSERT first, and if unsuccessful it executes an UPDATE.