You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been facing some problems with one to one relations (one direction).
I have an entity ProjectDraft linked to Project, between an field published_project_id.
Which gives me only ProjectDraft object, because published_project_id is NULL yet.
So far so good.
When I am trying to getProject, it gives me NULL, which is correct.
When I try to getProject()->exists() it give me Exception "Uncaught Error: Call to a member function exists() on null ", which is a king weird because exists() function return false, when we don't have a relation created.
After that, I trying to get_class of getProject, which should be Project or NULL or something like that (in my thoughts), but it give me the Class which I am debugging var, for instance, if you are in a projectAction class, it give me projectAction, it might be not normal this behavior I think.
I am thinking or I am doing anything wrong ?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Hi guys, bring some trouble again.
I've been facing some problems with one to one relations (one direction).
I have an entity ProjectDraft linked to Project, between an field published_project_id.
Here is the schema I am using:
After this, I am trying to fetch one ProjectDraft object, trough this query:
Which gives me only ProjectDraft object, because published_project_id is NULL yet.
So far so good.
When I am trying to getProject, it gives me NULL, which is correct.
When I try to getProject()->exists() it give me Exception "Uncaught Error: Call to a member function exists() on null ", which is a king weird because exists() function return false, when we don't have a relation created.
After that, I trying to get_class of getProject, which should be Project or NULL or something like that (in my thoughts), but it give me the Class which I am debugging var, for instance, if you are in a projectAction class, it give me projectAction, it might be not normal this behavior I think.
I am thinking or I am doing anything wrong ?
Thanks in advance.
The text was updated successfully, but these errors were encountered: