Skip to content

Referenced entries not updated correctly in registry #110

Description

@clemens

The current implementation suffers from issues because the registry values aren't updated correctly.

Sample use case:

  • Create a customer with a credit card using Braintree::Customer.create
  • Create a subscription with a discount using Braintree::Subscription.create with the credit card from above.
  • Update the discount using Braintree::Subscription.update with appropriate values for discounts: { update: [...] }.
  • Check the discount via the customer (Braintree::Customer.find(...).credit_cards[0].subscriptions[0].discounts[0]) or the credit card (Braintree::CreditCard.find(...).subscriptions[0].discounts[0]) => it still has the old values. Check the subscription directly (Braintree::Subscription.find(...).discounts[0]`) => it has the new values.

Is there any desire to fix this? I'd imagine it's not too easy since it would probably be necessary to come up with an entirely new concept for the registry (e.g. using a database or building something like an identity map).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions