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
Question: Is it possible to addConnectionForRelationship: with a abstract entity relationship and connectedBy: with a child entity's attributeName? #2121
Comments
Update workaround with more detail Why the workaround above not working:
JSON:
Mappings:
+ [Boy boyMapping]:
This will not work because Tricky workaround:
then edit the
Then the dynamic JSON format can be parsed correctly. The main problem is when some one need to add relationship from the dynamic JSON with such abstract & child entity , the |
Summary:
|
Example:
Article have a author relationship which point to PenName entity.
PenName have a people relationship which point to People abstract entity.
People has two child entity: Boy and Girl.
Boy have a boyID, Girl have a girlID.
Here comes a JSON:
"11" is the boyID.
"Jack" is the pen name
I can use
RKDynamicMapping
to ensure "boy_pen_name" is mapping with a boy PenName mapping.But how to
addConnectionForRelationship:connectedBy:
for the people relationship of PenName?Because People abstract entity don't have any ID attribute.
I came up with a workaround:The workaround is NOT working:
The text was updated successfully, but these errors were encountered: