ToStringBehavior for Propel2
This Behavior lets you define the default toString() method for tables.
Add the package to your composer.json
:
{
"require": {
"weconstudio-it/weconstudio-it/propel-to-string-behavior": "~1.0@dev"
}
}
<table name="default_order_1">
<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
<column name="title" type="VARCHAR" />
<behavior name="default-order">
<parameter name="column" value="title"/>
</behavior>
</table>
<table name="default_order_2">
<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
<column name="title" type="VARCHAR" />
<behavior name="default-order">
<parameter name="column1" value="title"/>
<parameter name="column2" value="id desc"/>
</behavior>
</table>
See the LICENSE file.