# trOidPropelBehaviorPlugin plugin The trOidPropelBehaviorPlugin is a symfony plugin that provides automatic generation of "Object IDentifier" for any propel object. ## Installation * Install the plugin symfony plugin:install trOidPropelBehaviorPlugin Stable version svn co http://svn.symfony-project.com/plugins/trOidPropelBehaviorPlugin/tags/1.0.5 Developer version svn co http://svn.symfony-project.com/plugins/trOidPropelBehaviorPlugin/branches/1.0 * Enable Propel behavior support in propel.ini: propel.builder.AddBehaviors = true * Add necessary fields to your model * Rebuild your database and model symfony propel:build-all * Enable the generator behavior for one of your Propel model: <php // lib/model/News.php class News { } sfPropelBehavior::add( 'News', array( 'trOidObjectGenerator' => array( 'oid_column' => 'my_object_oid_column', 'delete_object_oid' => false ) ) ); * Enable the viewer behavior for one of your Propel model: <php // lib/model/ObjectLog.php class ObjectLog { } sfPropelBehavior::add( 'ObjectLog', array( 'trOidObjectViewer' => array( 'oid_column' => 'fk_object_oid_column' ) ) ); ## Usage Each time an object is saved, the behavior will verify validity of its OID. A new OID will be attributed to object if it does not already have one. ## Public API ### trOidObjectViewer * getObjectOidData() : Return object oid data * getObjectByOid() : Return object represent by oid ## Todo * Documentation