In a spring-boot webapp, i look for the update of only the @ElementCollection of an entity using JpaRepository given the member entity
public class Member implements Serializable {
private static final long serialVersionUID = 1L;
...
@ElementCollection
@CollectionTable(name = "address", joinColumns = @JoinColumn(name = "member"))
@OrderColumn(name = "idOrder")
private List<Address> addresses;
...
Member repository
@Repository
public interface MemberRepository extends JpaRepository<Member, Long> {
...
}
of course the method save(member) can works but i aim to persist only the elementCollection and not to carry with other attributes of member entity