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

Referenced entries not updated correctly in registry #110

Open
clemens opened this issue Nov 19, 2015 · 0 comments
Open

Referenced entries not updated correctly in registry #110

clemens opened this issue Nov 19, 2015 · 0 comments

Comments

@clemens
Copy link

clemens commented Nov 19, 2015

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant