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'm trying to have a model with a 'created_by' column that joins to the 'id' column of a user model. Since the name of the column is not of the format 'MODELNAME_id', it looks like I need to provide join() with an array to specify the comparisons. However, the documentation doesn't specify what this array should look like.
What should be the format of the comparisonsArray parameter for join()?
The text was updated successfully, but these errors were encountered:
Turns out I was looking in the wrong place - last night I found the 'via' entry in the options parameter of joinsTo(). Now I have the user information that I want included in the response. However, it is appearing as 'user', instead of 'created_by'. I tried several combinations of values for the 'name', 'via', and 'as' options, but the response still comes back as either 'user' or an error. How can I get the response to be 'created_by'?
I'm trying to have a model with a 'created_by' column that joins to the 'id' column of a user model. Since the name of the column is not of the format 'MODELNAME_id', it looks like I need to provide join() with an array to specify the comparisons. However, the documentation doesn't specify what this array should look like.
What should be the format of the comparisonsArray parameter for join()?
The text was updated successfully, but these errors were encountered: