<commit> commit the current transaction

name
commit
xml namespace
http://moyaproject.com/db

Commit any pending transaction. This will flush db operations to the database. If you have create new objects and you want to know their primary key (id), you will need to commit them to the database.

Note, that if this tag is called from within a <transaction> tag, nothing will be committed until the end of the <transaction>.

Example

<db:create model="model.shorturl" obj="form.data" dst="shorturl"/>
<db:commit />
<echo>${shorturl.id}</echo>
attributes
name purpose type required? default choices
db Database text No "_default"
inherited attributes
name purpose type required? default choices
if Conditional expression expression No yes