Trait that indicates that the children represented by this field should be deleted when the parent is deleted.
Simple OneToMany support for children from the same table
This is the base class to use for fields that represent one-to-many or parent-child relationships.
Adds behavior to delete orphaned fields before save.
Convert the model to a JavaScript object
Convert the model to a JavaScript object
Returns the instance in a Full Box if the instance is valid, otherwise returns a Failure with the validation errors
Returns the instance in a Full Box if the instance is valid, otherwise returns a Failure with the validation errors
Can this model object be deleted?
Can this model object be deleted?
An override for delete_! to propagate the deletion to all children of one-to-many fields implementing Cascade.
An override for delete_! to propagate the deletion to all children of one-to-many fields implementing Cascade. Returns false as soon as the parent or a one-to-many field returns false. If they are all successful returns true.
Append a function to perform after the commit happens
Append a function to perform after the commit happens
- the function to perform after the commit happens
Find the field by name
Find the field by name
-- the name of the field to find
Box[MappedField]
flat map the fields titles and forms to generate a list
flat map the fields titles and forms to generate a list
called with displayHtml, fieldId, form
flat map the fields titles and forms to generate a list
flat map the fields titles and forms to generate a list
called with displayHtml, fieldId, form
This implicit allows a MappedForeignKey to be used as foreignKey function.
This implicit allows a MappedForeignKey to be used as foreignKey function. Returns a function that takes a Mapper and looks up the actualField of field on the Mapper.
Get the fields (in order) for displaying a form
Get the fields (in order) for displaying a form
If there's a field in this record that defines the locale, return it
If there's a field in this record that defines the locale, return it
map the fields titles and forms to generate a list
map the fields titles and forms to generate a list
called with displayHtml, fieldId, form
An override for save to propagate the save to all children of this parent.
An override for save to propagate the save to all children of this parent. Returns false as soon as the parent or a one-to-many field returns false. If they are all successful returns true.
Save the instance and return the instance
Save the instance and return the instance
If the instance calculates any additional fields for JSON object, put the calculated fields here
If the instance calculates any additional fields for JSON object, put the calculated fields here
Present the model as a form and execute the function on submission of the form
Present the model as a form and execute the function on submission of the form
- If it's Full, put a submit button on the form with the value of the parameter
- the function to execute on form submission
the form
Present the model as a form and execute the function on submission of the form
Present the model as a form and execute the function on submission of the form
- If it's Full, put a submit button on the form with the value of the parameter
- redirect to the URL if the model validates, otherwise display the errors
the form
Present the model as a HTML using the same formatting as toForm
Present the model as a HTML using the same formatting as toForm
the html view of the model
(Since version 2.6) Use appendFieldTransform with CssSels instead.
(Since version 2.6) Use fieldMapperTransforms with CssSels instead.
(Since version 2.6) Use fieldTransforms with CssSels instead.
(Since version 2.6) Use prependFieldTransform with CssSels instead.
Add this trait to a Mapper for managed one-to-many support For example: class Contact extends LongKeyedMapper[Contact] with OneToMany[Long, Contact] { ... }
the type of the primary key
the mapper type