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

Removing mixins for Ember Octane #42

Open
vishwasraj-thyagaraj opened this issue Oct 22, 2020 · 1 comment
Open

Removing mixins for Ember Octane #42

vishwasraj-thyagaraj opened this issue Oct 22, 2020 · 1 comment

Comments

@vishwasraj-thyagaraj
Copy link

Is there any plans to port the addon to octane ?

@miguelcobain
Copy link
Collaborator

I think the best way to move this addon forward into an octane world would be to move to simply export a function. There are some pieces missing, like:

To copy a model's relationship, that relational model must have the Copyable mixin or else it will just be copied by reference.

If we use a function, we can't "mark" a model as copyable. I was thinking a good api would be:

@hasMany('comment', { async: true, copy: true })
comments;

or even

@hasMany('comment', { async: true, copy: 'deep' })
comments;

@belongsTo('comment', { async: true, copy: 'reference' })
author;

I think this might even be a superior api because we might want to copy a model in some relationships and not on others.

Alternatively we could somehow pass in this information to the function itself.

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