title: Update via @Modifying @Query in Spring Data not working
body: <p>I have the following repository defined:</p>
  
  <pre><code>@Repository
  public interface IntegrationPeriodConstraintsRepository extends CrudRepository&lt;IntegrationPeriodConstraint, IntegrationPeriod&gt;
  {
      @Query("select case when (count(ipc) &gt; 0) then true else false end from IntegrationPeriodConstraint ipc where ipc.m_enabled = true")
      boolean hasEnabledConstraints();
  
      @Modifying
      @Query("update IntegrationPeriodConstraint ipc set ipc.m_lastIntegrationTimeIntegratedData = :time where ipc.m_integrationPeriod = :integrationPeriod")
      void setLastIntegrationTimeIntegratedData( @Param("integrationPeriod") IntegrationPeriod integrationPeriod,
                                                 @Param("time") DateTime lastIntegrationTime );
  }
  </code></pre>
  
  <p>However, it seems that this <code>setLastIntegrationTimeIntegratedData</code> method is not working. I have a unit/integration test using an embedded H2 database that shows that after the call, there is no update in the database.</p>
  
  <p>I enabled Hibernate logging and it shows this:</p>
  
  <pre><code>2015-01-27 11:49:13 DEBUG [main] AnnotationTransactionAttributeSource - Adding transactional method 'IntegrationPeriodConstraintsServiceImpl.setLastIntegrationTime' with attribute: PROPAGATION_REQUIRED,ISOLATION_DEFAULT; ''
  2015-01-27 11:49:13 DEBUG [main] AnnotationTransactionAspect - Skipping transactional joinpoint [com.company.server.common.service.message.impl.IntegrationPeriodConstraintsServiceImpl.setLastIntegrationTime] because no transaction manager has been configured
  2015-01-27 11:49:13 DEBUG [main] AbstractFlushingEventListener - Processing flush-time cascades
  2015-01-27 11:49:13 DEBUG [main] AbstractFlushingEventListener - Dirty checking collections
  2015-01-27 11:49:13 DEBUG [main] AbstractFlushingEventListener - Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
  2015-01-27 11:49:13 DEBUG [main] AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
  2015-01-27 11:49:13 DEBUG [main] EntityPrinter - Listing entities:
  2015-01-27 11:49:13 DEBUG [main] EntityPrinter - com.traficon.domain.system.IntegrationPeriodConstraint{m_integrationPeriod=MINUTES_1, m_lastIntegrationTimeIntegratedData=null, m_enabled=true, m_lastIntegrationTimePresenceData=null, m_storageSingleFieldPeriod=PT6M, m_lastIntegrationTimeFlowData=null, m_lastIntegrationTimeBicycleData=null}
  2015-01-27 11:49:13 DEBUG [main] SQL - update IntegrationPeriodConstraint set lastIntegrationTimeIntegratedData=? where integrationPeriod=?
  2015-01-27 11:49:13 TRACE [main] BasicBinder - binding parameter [1] as [TIMESTAMP] - 2015-01-27 11:49:13.81
  2015-01-27 11:49:13 DEBUG [main] JpaTransactionManager - Found thread-bound EntityManager [org.hibernate.ejb.EntityManagerImpl@5f0e6817] for JPA transaction
  2015-01-27 11:49:13 DEBUG [main] JpaTransactionManager - Participating in existing transaction
  </code></pre>
  
  <p>What I find strange is that there is no logging for the 2nd parameter?</p>
  
  <p>This is the Hibernate mapping file I use:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE hibernate-mapping PUBLIC
          "-//Hibernate/Hibernate Mapping DTD//EN"
          "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"&gt;
  &lt;hibernate-mapping package="com.mycompany.domain.system" default-access="field"&gt;
  
  
      &lt;class name="IntegrationPeriodConstraint" table="IntegrationPeriodConstraint"&gt;
  
          &lt;id name="m_integrationPeriod" column="integrationPeriod"&gt;
              &lt;type name="com.mycompany.persistence.impl.hibernate.usertype.EnumUserType"&gt;
                  &lt;param name="enumClass"&gt;com.mycompany.domain.message.data.IntegrationPeriod&lt;/param&gt;
              &lt;/type&gt;
  
              &lt;generator class="assigned"/&gt;
          &lt;/id&gt;
  
          &lt;property name="m_storageSingleFieldPeriod" not-null="true"
                    type="com.mycompany.persistence.impl.hibernate.usertype.BaseSingleFieldPeriodUserType"&gt;
              &lt;column name="storagePeriodType"/&gt;
              &lt;column name="storagePeriodValue"/&gt;
          &lt;/property&gt;
  
          &lt;property name="m_enabled" not-null="true" column="enabled"/&gt;
  
          &lt;property name="m_lastIntegrationTimeIntegratedData" column="lastIntegrationTimeIntegratedData" type="org.jadira.usertype.dateandtime.joda.PersistentDateTime"/&gt;
          &lt;property name="m_lastIntegrationTimeFlowData" column="lastIntegrationTimeFlowData" type="org.jadira.usertype.dateandtime.joda.PersistentDateTime"/&gt;
          &lt;property name="m_lastIntegrationTimePresenceData" column="lastIntegrationTimePresenceData" type="org.jadira.usertype.dateandtime.joda.PersistentDateTime"/&gt;
          &lt;property name="m_lastIntegrationTimeBicycleData" column="lastIntegrationTimeBicycleData" type="org.jadira.usertype.dateandtime.joda.PersistentDateTime"/&gt;
      &lt;/class&gt;
  
  &lt;/hibernate-mapping&gt;
  </code></pre>