panwenbin/yii2-oci-sequence-behavior

use Oracle sequence on insert when there is no trigger

1.0.0 2017-11-03 03:46 UTC

This package is not auto-updated.

Last update: 2024-05-04 13:19:40 UTC


README

OciSequenceBehavior

This is usefull when an Oracle sequence not set with a trigger. Add the behavior, the primary key will be set to SEQUENCE.NEXTVAL.

Usage

Add this behavior to oci ActiveRecord model

public function behaviors()
{
    return [
        [
            'class' => OciSequenceBehavior::className(),
            'sequenceName' => 'SOME_SEQ',
        ],
    ];
}