Commit 1da5baee authored by zYne's avatar zYne

--no commit message

--no commit message
parent fecce947
......@@ -150,11 +150,11 @@ final class Doctrine
const ATTR_FIELD_CASE = 102;
const ATTR_IDXNAME_FORMAT = 103;
const ATTR_SEQNAME_FORMAT = 104;
const ATTR_SEQCOL_NAME = 105;
const ATTR_CMPNAME_FORMAT = 118;
const ATTR_DBNAME_FORMAT = 117;
const ATTR_TBLCLASS_FORMAT = 119;
const ATTR_EXPORT = 140;
const ATTR_SEQCOL_NAME = 105;
......@@ -169,7 +169,7 @@ final class Doctrine
const ATTR_DEF_VARCHAR_LENGTH = 114;
const ATTR_DEF_TABLESPACE = 115;
const ATTR_EMULATE_DATABASE = 116;
const ATTR_DEFAULT_SEQUENCE = 133;
/** TODO: REMOVE THE FOLLOWING CONSTANTS AND UPDATE THE DOCS ! */
......
......@@ -127,6 +127,7 @@ abstract class Doctrine_Configurable
case Doctrine::ATTR_ACCESSOR_PREFIX_GET:
case Doctrine::ATTR_ACCESSOR_PREFIX_SET:
case Doctrine::ATTR_EMULATE_DATABASE:
case Doctrine::ATTR_DEFAULT_SEQUENCE:
break;
case Doctrine::ATTR_SEQCOL_NAME:
......
......@@ -39,7 +39,12 @@ abstract class Doctrine_Hook_Parser
{
return $this->condition;
}
/**
* getParams
* returns the parameters associated with this parser
*
* @return array
*/
public function getParams()
{
return $this->params;
......
......@@ -266,10 +266,14 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
$this->identifierType = Doctrine_Identifier::SEQUENCE;
$found = true;
if($value) {
if ($value) {
$this->options['sequenceName'] = $value;
} else {
$this->options['sequenceName'] = $this->conn->getSequenceName($this->options['tableName']);
if (($sequence = $this->getAttribute(Doctrine::ATTR_DEFAULT_SEQUENCE)) !== null) {
$this->options['sequenceName'] = $sequence;
} else {
$this->options['sequenceName'] = $this->conn->getSequenceName($this->options['tableName']);
}
}
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment