Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to bug in atk/src/Relations/ManyToOneTreeRelation.php #56

Open
jgarifuna opened this issue May 28, 2020 · 0 comments
Open

Fix to bug in atk/src/Relations/ManyToOneTreeRelation.php #56

jgarifuna opened this issue May 28, 2020 · 0 comments

Comments

@jgarifuna
Copy link

    # in edit() method:
        # to avoid ambiguity error
        change:
            $recordset = $this->m_destInstance->select($this->m_destInstance->m_primaryKey[0])->includes($tmp2)->getAllRows(); // original

        to:
            $recordset = $this->m_destInstance->select($this->m_destInstance->getTable() . '.' . $this->m_destInstance->m_primaryKey[0])->includes($tmp2)->getAllRows(); // by Jorge Garifuna

        # to have the correct selected value in the drop down list
        change:             
            $this->m_current = $this->m_ownerInstance->primaryKey($record); // original

        to:
            $this->m_current = $this->m_ownerInstance->primaryKey($record[$this->fieldName()]); // by Jorge Garifuna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant