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-11-02 15:46:15 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',
        ],
    ];
}