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

Remove speedment()-method from entities #209

Closed
Pyknic opened this issue May 31, 2016 · 0 comments
Closed

Remove speedment()-method from entities #209

Pyknic opened this issue May 31, 2016 · 0 comments

Comments

@Pyknic
Copy link
Contributor

Pyknic commented May 31, 2016

Having abstract entities that are implemented anonymously by the manager is not a very good pattern. It results in more complex design and makes it more difficult to understand how Speedment works. The only reason for this is that we don't want to store the Speedment instance in every entity and we need it to persist, update and delete entities.

A potential solution for this would be to include the Speedment-instance in the method call where it is needed. It would look something like this:

User user = new UserImpl()
    .setFirstname("Foo")
    .setLastname("Bar")
    .persist(speedment);

This would be quite a big API change and would therefore have to wait until the 2.4.0 Forest release.

@Pyknic Pyknic added this to the 2.4.0 Forest milestone May 31, 2016
@Pyknic Pyknic added the verify label May 31, 2016
@Pyknic Pyknic added fixed and removed verify labels Jul 12, 2016
@minborg minborg closed this as completed Aug 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants