title: Spring Boot + JPA + Hibernate does not commit when repository.save
body: <p>I have a Spring Boot Application + JPA with MySQL. In my controller, when I post an entity I am able to call to repository.save, and I return the "created/updated" object.</p>
  
  <p>But, when I look at the database, I see that the object is not updated.</p>
  
  <p>Here is my application.yml:</p>
  
  <pre><code>spring:
    jpa:
      show-sql: true
      generate-ddl: false
      hibernate:
        ddl-auto: none
      properties:
        hibernate.dialect: org.hibernate.dialect.MySQLDialect
        org.hibernate.envers.store_data_at_delete: true
        org.hibernate.envers.global_with_modified_flag: true
        org.hibernate.envers.track_entities_changed_in_revision: true
    datasource:
      initialize: false
      url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:databaseName}?createDatabaseIfNotExist=true
      username: ${DB_USERNAME:root}
      password: ${DB_PASSWORD:root}
      driver-class-name: com.mysql.jdbc.Driver
      hikari:
        minimumIdle: 20
        maximumPoolSize: 30
        idleTimeout: 5000
        data-source-properties:
          cachePrepStmts: true
          prepStmtCacheSize: 250
          prepStmtCacheSqlLimit: 2048
  </code></pre>
  
  <p>Do you know what else do I have to do?</p>
  
  <p>This is my controller:</p>
  
  <pre><code>@RequestMapping(method = RequestMethod.POST, produces = "application/json")
  public MyEntity saveMyEntity(@Valid @RequestBody final MyEntity myEntity) {
      Assert.notNull(myEntity, "The entry cannot be null");
      return myEntityService.save(myEntity);
  }
  </code></pre>
  
  <p>And MyEntityService:</p>
  
  <pre><code>@Override
  @UserCanCud
  public Entity save(final Entity entity) {
      Assert.notNull(entity);
      final Entity savedEntity = repository.save(entity);
      return savedEntity;
  }
  </code></pre>