Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR Remove PostgreSQLDatabase boolean workaround in

DataObject::__construct()

The database adapter uses smallint instead of the boolean datatype,
which works around the issue instead of converting the value.
  • Loading branch information...
commit 0a2e87762538e64ae3f2973b2154f57a94ddffac 1 parent 59e68f1
@halkyon halkyon authored
Showing with 0 additions and 9 deletions.
  1. +0 −9 model/DataObject.php
View
9 model/DataObject.php
@@ -313,15 +313,6 @@ function __construct($record = null, $isSingleton = false, $model = null) {
$record = null;
}
- // Convert PostgreSQL boolean values
- // TODO: Implement this more elegantly, for example by writing a more intelligent SQL SELECT query prior to object construction
- if(DB::getConn() instanceof PostgreSQLDatabase) {
- $this->class = get_class($this);
- foreach($record as $k => $v) {
- if($this->db($k) == 'Boolean' && $v == 'f') $record[$k] = '0';
- }
- }
-
// Set $this->record to $record, but ignore NULLs
$this->record = array();
foreach($record as $k => $v) {
Please sign in to comment.
Something went wrong with that request. Please try again.