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

Support sequel association attributes #67

Open
fran-worley opened this issue Sep 26, 2017 · 3 comments
Open

Support sequel association attributes #67

fran-worley opened this issue Sep 26, 2017 · 3 comments

Comments

@fran-worley
Copy link
Collaborator

Sequel by design does not save entire object graphs. Its association modification methods are designed to be very direct and not offer a lot of abstraction.

Rather than creating the records inline, we need to support creating the associated objects and then adding them to the parent.

Another option would be to make use of the nested attributes plugin but that might be even messier...

@apotonick
Copy link
Owner

I actually had a loooong chat with @solnic a few days ago and the plan is to get rid of Disposable and use ROM instead for domain-to-persistence operations. Cool? That could also be done step-wise by not relying on AR's crazy API but to base Disposable on Sequel's API and then add AR.

@fran-worley
Copy link
Collaborator Author

That sounds awesome but how would that work for people that by choice (or not!) are using AR or Sequel?

Given our mutual feelings on AR it makes more sense to me to do as you say and base disposable on a supported ORM and add AR in as an option.

@solnic
Copy link

solnic commented Sep 27, 2017

You could come up with a common API and have adapters that implement it to support specific persistence libraries (AR, Sequel, rom-rb).

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

3 participants