Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Propel has some nice features you should know about:
- It's very flexible: you can simply extend Propel;
- It uses PDO (PHP Data Objects) so it allows you to use the RDBMS of your choice (MySQL, SQLite, PostgreSQL, Oracle and MSSQL are supported);
- Propel is an open-source project which is [well documented](http://propelorm.org/Propel/documentation/).
- Added support for proper binding of Oracle CLOB data
- Added support for setting sequence cache sizes on Oracle

## Installation ##

Expand Down
1 change: 1 addition & 0 deletions generator/lib/platform/MysqlPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected function initialize()
$this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARBINARY, "LONGBLOB"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::BLOB, "LONGBLOB"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::CLOB, "LONGTEXT"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::CLOB_EMU, "LONGTEXT"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::TIMESTAMP, "DATETIME"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::OBJECT, "TEXT"));
$this->setSchemaDomainMapping(new Domain(PropelTypes::PHP_ARRAY, "TEXT"));
Expand Down
11 changes: 5 additions & 6 deletions generator/lib/platform/OraclePlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,12 @@ public function getAddSequencesDDL(Table $table)
if ($table->getIdMethod() == "native") {
$pattern = "
CREATE SEQUENCE %s
INCREMENT BY 1 START WITH 1 NOMAXVALUE NOCYCLE NOCACHE ORDER;
INCREMENT BY 1 START WITH 1 NOMAXVALUE NOCYCLE NOCACHE %s ORDER;
";

return sprintf($pattern,
$this->quoteIdentifier($this->getSequenceName($table))
$this->quoteIdentifier($this->getSequenceName($table)),
$this->getSequenceCache($table) ? $this->gwtSequenceCache($table) : 20
);
}
}
Expand Down Expand Up @@ -347,10 +348,8 @@ public function getAddIndexDDL(Index $index)
*/
public function getColumnBindingPHP($column, $identifier, $columnValueAccessor, $tab = " ")
{
if ($column->getPDOType() == PropelTypes::CLOB_EMU) {
return sprintf(
"%s\$stmt->bindParam(%s, %s, %s, strlen(%s));
",
if ($column->getPropelType() == PropelTypes::CLOB_EMU) {
return sprintf("\n%s\$stmt->bindParam(%s, %s, %s, strlen(%s));",
$tab,
$identifier,
$columnValueAccessor,
Expand Down