public function testGetCreateSQLWithFloatDataFromNotAnnotatedEntity() { $this->notAnnotatedTest->setString("some string"); $this->notAnnotatedTest->setFloat(0.019284); $sql = $this->notAnnotatedTableData->getCreateSQL($this->notAnnotatedTest); $this->assertEqualsFixture($sql, __FUNCTION__); $this->runQuery($sql); }
/** * @param $obj * @param $parentId * @param $fkField TableField * @return mixed */ private function persistEntity($obj, $parentId = null, $fkField = null) { $query = $this->table->getCreateSQL($obj, $parentId, $fkField); $this->runQuery($query); if ($this->table->getPrimaryKeyField()->isAutoIncrement()) { $insertId = $this->database->getMysqli()->insert_id; $this->setIdValue($obj, $insertId); } $this->setVersion($obj); $this->persistReferences($obj); $this->setCache($obj); return $this->getIdValue($obj); }