Skip to content

Commit 50811c1

Browse files
Cleaned up constructor
1 parent 30bcbf3 commit 50811c1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/MySimpleORM/Mapper/ObjectMapping.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ public function __construct($o)
3030
$this->ClassName = $classPathArray[sizeof($classPathArray) - 1];
3131
$this->Database = new Database();
3232
$this->Object = $o;
33-
if ($this->Database->connect()) {
34-
$this->PrimaryKey = $this->Database->getKeys($this->ClassName, "primary");
35-
$this->ForeignKeys = $this->Database->getKeys($this->ClassName, "foreign");
36-
}
33+
$this->PrimaryKey = $this->Database->getKeys($this->ClassName, "primary");
34+
$this->ForeignKeys = $this->Database->getKeys($this->ClassName, "foreign");
3735
}
3836

3937
public function __destruct()

0 commit comments

Comments
 (0)