title: Can't get work Liquibase with spring hibernate
body: <p>Till now, I have used liquibase with spring and standard changelog file. Now I want to integrate it to hibernate so when I do any change to entity, it should change tables and update changelog table.</p>
  
  <p>I read many examples, and tutorials and can't get it work. </p>
  
  <p>I use datasource, entityManagerFactory(denepds-on="liquibase") all work fine. But when I add liquibase bean it doesn't change database from entity. And "no table with name" exception is thrown. </p>
  
  <p><strong>How to configure Liquibase with liquibase-hibernate4 and spring?</strong></p>
  
  <p><em>my liquibase bean:</em></p>
  
  <pre><code>&lt;bean id="liquibase" class="liquibase.integration.spring.SpringLiquibase"&gt;
        &lt;property name="dataSource" ref="myJdbcDataSource" /&gt;
        &lt;property name="beanName" value="entityManagerFactory" /&gt;
        &lt;property name="changeLog" value="classpath:databaseChangeLog.sql" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I just added beanName prop as entityManagerFactory from: <a href="https://github.com/liquibase/liquibase-hibernate/wiki" rel="nofollow">https://github.com/liquibase/liquibase-hibernate/wiki</a>, <a href="http://www.liquibase.org/documentation/spring.html" rel="nofollow">http://www.liquibase.org/documentation/spring.html</a>. And did what I can understand from this posts. </p>
  
  <p>In this posts, it mentioned that we should use one of three variants</p>
  
  <pre><code>hibernate:spring:com/example/spring.xml?bean=sessionFactory
  hibernate:spring:com.example?dialect=org.hibernate.dialect.MySQL5Dialect
  hibernate:spring:com.example.employee,com.example.auction?dialect=org.hibernate.dialect.MySQL5Dialect
  </code></pre>
  
  <p>But I don't know how to use it with liquibase bean when we using spring </p>