[ 
https://issues.apache.org/jira/browse/DELTASPIKE-943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek closed DELTASPIKE-943.
---------------------------------------

> 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: Improvement
>          Components: JPA-Module
>    Affects Versions: 1.4.1
>         Environment: JPA
>            Reporter: Robin Roos
>            Assignee: Daniel Cunha (soro)
>            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)

Reply via email to