Fork of https://bitbucket.org/odin88/cakephp-2.0-oracle
will see how it fares
- adding composer.json
- reading & saving associations
- delete problems
- transactions problems
- caching problems
I configure the connection as:
public $default = array(
'datasource' => 'Oracle.Oracle',
'driver' => 'oracle',
'connect' => 'oci_pconnect',
'persistent' => false,
'host' => 'localhost',
'login' => 'username',
'password' => 'password',
'database' => 'example.com/sid',
'prefix' => '',
);
- for autoincrement use sequences with triggers
CREATE SEQUENCE "configurations_seq"
MINVALUE 1
MAXVALUE 999999999999999999999999999
INCREMENT BY 1
START WITH 1
NOCACHE
NOORDER
NOCYCLE ;
/
CREATE OR REPLACE TRIGGER "configurations_ai"
BEFORE INSERT ON "configurations"
FOR EACH ROW
BEGIN
select "configurations_seq".nextval into :new."id" from dual;
END;
/
ALTER TRIGGER "configurations_ai" ENABLE;
- virtualFields have to be without spaces after commas to work around issue #14
$this->virtualFields['url'] = 'CONCAT(\'/bookings/view/\',Booking.id)';
- avoid NOT NULL with empty string defaults - leads to "cannot insert NULL"