I'm getting a strange error when I attempt to do a simple select all statement with the following model:
public $REQUEST_ID;
public $RTM;
public $DATE_TYPE;
public $START_DATE;
public $END_DATE;
public $REQUEST_START_DATE;
public $REQUEST_END_DATE;
public $CREATION_DATE;
public $CREATION_USER;
public $STATUS;
//Utility
public function initialize() {
$this->setSource('O2B_REQUESTS');
$this->setConnectionService('dbOracle');
$this->hasMany("REQUEST_ID", "Params", "REQUEST_ID");
}
The error is PDOException: SQLSTATE[HY000]: General error: 936 OCIStmtExecute: ORA-00936: missing expression (ext\pdo_oci\oci_statement.c:148). Looking at the SQL logger, I find this query (apparently attempting to generate metadata? It's obviously malformed.):
SELECT Z2.* FROM (SELECT Z1.*, ROWNUM DB_ROWNUM FROM ( SELECT ) Z1 ) Z2 WHERE Z2.DB_ROWNUM BETWEEN 1 AND 0
This occurs whether or not the hasMany relationship is applied.
Any thoughts?
Edit1: Additionally, specifying schema does not help (results in the table not being found). Edit2: Managed to set the schema and have it find the table correctly, but the above error still occurs.