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

morphTo causes issues if there is no morphable _type defined #114

Open
smallhadroncollider opened this issue Jul 18, 2016 · 0 comments
Open

Comments

@smallhadroncollider
Copy link
Contributor

smallhadroncollider commented Jul 18, 2016

I have a Document class with a documentable morphTo relationship.

If I try to access $document->documentable when the documentable_type column is NULL I get two different issues, depending on the context.


  1. A Class not found exception

This seems to be caused because the $class variable cannot get a value in the morphTo method of EntityMap


  1. A SQLSTATE[42S22]: Column not found: 1054 Unknown column 'documents.' in 'where clause' (SQL: select *,idfromdocumentswheredocuments.``is null limit 1)

Trying to select with a blank column name, presumably as the column name cannot be set from anywhere.

@smallhadroncollider smallhadroncollider changed the title morphTo causes issues if there is not morphable _type defined morphTo causes issues if there is no morphable _type defined Jul 18, 2016
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