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

if you change primary key to something other than id, incoming broadcast messages will not work #358

Closed
catmando opened this issue Feb 22, 2021 · 0 comments
Labels
ready-to-release Internal Use Only: Has been fixed, specs passing and pushed to edge branch

Comments

@catmando
Copy link
Contributor

Problem is load_from_json is passed the primary_key attribute, but it is checking for id instead of primary_key.

Then it attempts to call hyperstack_internal_setter'your_primary_key_value' instead of _hyperstack_internal_setter_id. But that method is just a nop, so instead load_from_json should just add this guard:

target.send("hyperstack_internal_setter#{method}", value.first) unless method == target.class.primary_key

on about line 509

catmando added a commit that referenced this issue Feb 22, 2021
@catmando catmando added the ready-to-release Internal Use Only: Has been fixed, specs passing and pushed to edge branch label Mar 15, 2021
catmando added a commit that referenced this issue Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-release Internal Use Only: Has been fixed, specs passing and pushed to edge branch
Projects
None yet
Development

No branches or pull requests

1 participant