Regression: diff generates full schema instead of changes when using liquibase-hibernate4

Description

When using liquibase 3.0.5, 3.0.6 or 3.0.7, the command mvn liquibase:diff generates change sets of full table creation, as if the database were empty. Liquibase connects to the Oracle database, but its schema is not considered for the diff. No errors nor warnings appear in the maven console. This does not happen with liquibase 3.0.4. This does not happen if the referenceUrl points to a jdbc database.

Example

Entity:
{{{quote}
@Entity
@Table(name = "TAREAS")
public class Tarea {

@Id
@GeneratedValue(strategy = AUTO)
@Column(name = "ID_USER")
private Integer id;

@Column
private Integer zzz;
}

}}

Current database schema:
{{

CREATE TABLE TAREAS (
ID_USER NUMBER PRIMARY KEY
)

}}

Change set generated by liquidbase diff 3.0.7:
{{

<changeSet author="promero (generated)" id="1383837489961-1">
<createTable tableName="TAREAS">
<column autoIncrement="true" name="ID_USER" type="NUMBER">
<constraints primaryKey="true" primaryKeyName="TAREASPK"/>
</column>
<column name="zzz" type="NUMBER"/>
</createTable>
</changeSet>

}}

Change set generated by liquidbase diff 3.0.4:
{{

<changeSet author="promero (generated)" id="1383838690719-1">
<addColumn tableName="TAREAS">
<column name="zzz" type="number"/>
</addColumn>
</changeSet>

 

}}

Environment

Base software:
{{{quote}
Windows 8 x64
Oracle 10g
jdk1.7.0_40
Maven 3.1.1

}}

Maven plugins:
{{

org.liquibase liquibase-maven-plugin 3.0.7

}}

Maven dependencies:
{{

org.liquibase liquibase-core 3.0.7
org.liquibase.ext liquibase-hibernate4 3.0
org.springframework 3.2.4.RELEASE
org.springframework spring-hibernate3 2.0.8
org.hibernate hibernate-entitymanager 4.2.6.Final
com.oracle ojdbc14 10.2.0.4

}}

Liquibase relevant properties:
{{

referenceUrl = hibernate:spring:myapp.model?dialect=org.hibernate.dialect.Oracle10gDialect
verbose = true
logging = debug

 

}}

Status

Reporter

Bocca Romel

Fix versions

Affects versions

Priority

Major
Configure