Uploaded image for project: 'Spring Data JPA'
  1. Spring Data JPA
  2. DATAJPA-1324

delete method CrudRepository when @Version column is null insert new data

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Works as Designed
    • Affects Version/s: 1.11.11 (Ingalls SR11)
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      From SimpleJpaRepository

      @Transactional
      	public void delete(T entity) {
      
      		Assert.notNull(entity, "The entity must not be null!");
      		em.remove(em.contains(entity) ? entity : em.merge(entity));
      	}
      

      The em.merge causes an insert.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                schauder Jens Schauder
                Reporter:
                sonersivri soner sivri
                Last updater:
                Jens Schauder
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: