Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

Missing __doctrineLoad__() function declaration #140

Open
ghost opened this issue May 19, 2017 · 1 comment
Open

Missing __doctrineLoad__() function declaration #140

ghost opened this issue May 19, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented May 19, 2017

Hi,
the function in the doctrineLoad() doesn't exist, when loading a object by the proxy factory from the couchdb.

Attempted to call an undefined method named "__doctrineLoad__" of class "CouchDBProxies\__CG__\__CLASS__

After removing the doctrineLoad from the CouchDB DocumentManager, it works:

from

   /**
     * Initialize an object that is a lazy load proxy, or do nothing.
     *
     * @param object $obj
     */
    public function initializeObject($obj)
    {
        if ($obj instanceof PersistentCollection) {
            $obj->initialize();
        } else if ($obj instanceof Proxy\Proxy) {
            $obj->__doctrineLoad__();
        }
    }

to

    /**
     * Initialize an object that is a lazy load proxy, or do nothing.
     *
     * @param object $obj
     */
    public function initializeObject($obj)
    {
        if ($obj instanceof PersistentCollection) {
            $obj->initialize();
        }
    }

Is there a need for this function?

@Ocramius
Copy link
Member

Should probably be $obj->__load()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant