Robin Roos created DELTASPIKE-943: ------------------------------------- Summary: Provide add() methods instead of save() methods in EntityRepository Key: DELTASPIKE-943 URL: https://issues.apache.org/jira/browse/DELTASPIKE-943 Project: DeltaSpike Issue Type: Bug Components: JPA-Module Affects Versions: 1.4.1 Environment: JPA Reporter: Robin Roos Priority: Minor
The semantics of Repository is to model a Collection of persistent objects. There is no need to add() an object to a Collection if it is already in that Collection. By providing save() methods you lead developers to invoke save() on objects which they got from the Repository. This is (usually) inappropriate. Please provide add() methods to parallel the save() method signatures. Ideally the save() methods would be deprecated. Even if the save() methods remain, IDE inspections can then be configured to forbid their invocation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)