Association not working. Is 'property' a reserved name?
I am trying to associate one resource with another. This works well for most resources I have. However there's this one resource called 'Property' that I can' get to associate with any other resource.
If you see this code after submitting a form:
You'll notice I'm submitting
property_id
in params
. However it is not in the attributes
section from the source. Not sure why that is.
I have:
and
So I can associate accounts and clients, but not properties using the same-ish code. Just wondering if I may need to call my Property resource something else?
The form submit shows there's errors, but does't say what the actual errors are. So wondering if it's kind of an edge case?4 Replies
Do you need an API for your property relationship?
Sorry I'm not sure. My Property Looks like:
Like a normal resource.
I just feel like I've defined everything the same way as other relationships like 'agency' and 'client' but the 'property' association fails to associate.
Can you make sure to update to the latest ash phoenix?
We fixed a bug that this could be related to
Ah shoot this was my bad. I just renamed the fields and was still having the error. But then I just noticed I made a
read
action primary?: true
that took an argument on the property
resource.
So I stopped making that primary and just now verified it's working. It needed a default read action that didn't take an argument which makes total sense, I just missed it. Sorry for the trouble!