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

Repository should only use 'save' method #175

Closed
amatosg opened this issue Aug 28, 2020 · 1 comment · Fixed by #234
Closed

Repository should only use 'save' method #175

amatosg opened this issue Aug 28, 2020 · 1 comment · Fixed by #234
Assignees

Comments

@amatosg
Copy link
Contributor

amatosg commented Aug 28, 2020

Overview of the feature request

I'm not sure if this is a bug or a feature request, so I'm leaving it as FR.

I think using mergeAndSavemethod in repositories should be avoided.

Motivation for or Use Case

According to the documentation, in order to either create or update an entity, the method save should be used.

Related issues or PR

None that I know of.

@murdos
Copy link
Contributor

murdos commented Oct 20, 2020

When no service is generated for entity, I'm not sure because of the @Transactional annotation on the mergeAndSave method.
But when entity is generated with serviceClass or serviceImpl we should definitely not generate and use this mergeAndSave: the transaction is handled at the service level.

@murdos murdos mentioned this issue Oct 20, 2020
13 tasks
@JasonTypesCodes JasonTypesCodes self-assigned this Jan 22, 2021
atomfrede pushed a commit that referenced this issue Mar 29, 2021
* Removes use of mergeAndSave from repositories except the UserRepository (#175)

* Updates save_template to allow for updates distinctly from saves (#175)

* Refactors abstract repositories into interfaces.  Removes mergeAndSave from UserRepository (#175)
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

Successfully merging a pull request may close this issue.

3 participants