<get-required> get an object from the database, or return a 404 if it doesn't exist

name
get-required
xml namespace
http://moyaproject.com/db

Gets an object from the db. If the object is not present in the db then return a 404 (not found) response. This is useful when page content corresponds to a single object in the database.

Example

<db:get-required model="#Post" dst="post" let:slug="url.slug" />
attributes
name purpose type required? default choices
status Status code http status code No
inherited attributes
name purpose type required? default choices
db Database to use text No "_default"
dst Destination reference No
filter Filter expression database expression No
forupdate Issue a select FOR UPDATE? boolean No no
from Application application reference No
if Conditional expression expression No yes
model Model element reference text No
modelobj Model object expression No None
orderby Order by comma list No
src query set to restrict search expression No None
value Value expression No None