src/Easy/EasyForm.php
public function fetchData()
    {
        // if has valid active record, return it, otherwise do a query
        if ($this->activeRecord != null)
            return $this->activeRecord;

        $dataObj = $this->getDataObj();
        if ($dataObj == null)
            return;

        if (strtoupper($this->formType) == "NEW")
            return $this->getNewRecord();

        if (!$this->fixSearchRule && !$this->searchRule) {
            //if its a default sub form,even no search rule, but can still fetch a default record
            if (!is_array($this->getDataObj()->association)) {
                //only if its a default sub form and without any association then return emply array
                return array();
            }
        } else {
            if ($this->isRefreshData)
                $dataObj->resetRules();
            else
                $dataObj->clearSearchRule();

            if ($this->fixSearchRule) {
                if ($this->searchRule) {
                    $searchRule = $this->searchRule . " AND " . $this->fixSearchRule;
                } else {
                    $searchRule = $this->fixSearchRule;
                }
            }

            $dataObj->setSearchRule($searchRule);
            $dataObj->setLimit(1);
        }
        $resultRecords = $dataObj->fetch();
        if (!count($resultRecords)) {
            $this->recordAllowAccess = false;
        }

        $this->recordId = $resultRecords[0]['Id'];
        $this->setActiveRecord($resultRecords[0]);

        if ($this->getDataObj()) {
            $this->canUpdateRecord = (int) $this->getDataObj()->canUpdateRecord();
        }
        return $resultRecords[0];
    }
public function fetchData()
    {
        // if has valid active record, return it, otherwise do a query
        if ($this->activeRecord != null)
            return $this->activeRecord;

        $dataObj = $this->getDataObj();
        if ($dataObj == null)
            return;

        if (strtoupper($this->formType) == "NEW")
            return $this->getNewRecord();

        if (!$this->fixSearchRule && !$this->searchRule) {
            //if its a default sub form,even no search rule, but can still fetch a default record
            if (!is_array($this->getDataObj()->association)) {
                //only if its a default sub form and without any association then return emply array
                return array();
            }
        } else {
            if ($this->isRefreshData)
                $dataObj->resetRules();
            else
                $dataObj->clearSearchRule();

            if ($this->fixSearchRule) {
                if ($this->searchRule) {
                    $searchRule = $this->searchRule . " AND " . $this->fixSearchRule;
                } else {
                    $searchRule = $this->fixSearchRule;
                }
            }

            $dataObj->setSearchRule($searchRule);
            $dataObj->setLimit(1);
        }
        $resultRecords = $dataObj->fetch();
        if (!count($resultRecords)) {
            $this->recordAllowAccess = false;
        }

        $this->recordId = $resultRecords[0]['Id'];
        $this->setActiveRecord($resultRecords[0]);

        if ($this->getDataObj()) {
            $this->canUpdateRecord = (int) $this->getDataObj()->canUpdateRecord();
        }
        return $resultRecords[0];
    }
Fetch single record

@return array one record array