badlamer/propel-uuid-behavior

Propel behavior that helps you to set fixed UUID

Installs: 3 719

Dependents: 0

Stars: 4

Watchers: 2

Forks: 1

Language: PHP

0.1.0 2015-07-27 11:32 UTC

README

Helps you add UUID for propel ActiveRecord

Build Status

Requirements

This behavior requires Propel >= 1.6.0 and Rhumsaa\Uuid for PHP >= 2.6.0

Installation

Get the code by cloning this repository, or by using Composer (recommended):

{
    "require": {
        "badlamer/propel-uuid-behavior": "dev-master"
    }
}

Then, if you don't use Composer, or an autoloader in your application, add the following configuration to your build.properties or propel.ini file:

propel.behavior.uuid.class = vendor.badlamer.propel-uuid-behavior.src.UuidBehavior

Note: vendor.badlamer.propel-uuid-behavior.src.UuidBehavior is the path to access the UuidBehavior class in "dot-path" notation.

Then declare the behavior in your schema.xml:

<table name="person">
  <behavior name="uuid">
    <parameter name="name" value="uuid_column" />
  </behavior>
</table>