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