Skip to content

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

Closed
@catmando

Description

@catmando

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-to-releaseInternal Use Only: Has been fixed, specs passing and pushed to edge branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions