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

Deep inheritance cloning #20

Closed
kdisneur opened this issue Jan 28, 2013 · 2 comments
Closed

Deep inheritance cloning #20

kdisneur opened this issue Jan 28, 2013 · 2 comments

Comments

@kdisneur
Copy link

Hi,

We use amoeba to preview modifications on our data models, but we have an issue with deep inheritance as described below:

amoeba_inheritance

Basically a box has_many sub_products. In our example, box.sub_products returns SubSubProduct objects and we are unable to access to a parent class association, like in the graph above.
box.amoeba_dup.sub_products.first.another_product returns nil instead of AnotherProduct instance.

We have created a dummy app that reproduces the problem, you can find specs in the following repository: https://github.com/kdisneur/amoeba_inheritance

We've been really happy with amoeba so far and we're sorry we don't come with a fix (for now) but we wanted to share the issue with you.

Kevin

@rocksolidwebdesign
Copy link
Contributor

Cool thanks for the report and the test case, that's great, I'll have a look.

@kdisneur
Copy link
Author

Thanks you. For now, to achieve the expected behavior, we've added an amoeba block in the SubProduct model.

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

2 participants