mitchellvanw / laravel-doctrine

NO LONGER MAINTAINED! A Doctrine 2 implementation that melts with Laravel
MIT License
187 stars 74 forks source link

Undefined method getKeyName() #63

Closed neon64 closed 9 years ago

neon64 commented 10 years ago

When using the doctrine authentication driver, I am recieving the error call to undefined method getKeyName().

I traced it down to an issue within the DoctrineUserProvider class. It assumes that all entities will have the getKeyName() method. All eloquent models will, as they must extend the base Eloquent class, however Doctrine entities won't.

My suggestion is to use getKeyName() if it exists, or else just default to id.

neon64 commented 10 years ago

I also found another issue. The method RememberToken::getRememberTokenName() should return rememberToken instead of remember_token. Doctrine is thinking in terms of objects not tables so we should use camelCase.

mitchellvanw commented 9 years ago

This has been fixed in the new develop branch, which will become 1.0. It's Laravel 5 only though, for now. There'll be a laravel4 branch for support and bug fixes. No new features. I'm closing this issue, thanks!