I’m using JPA annotations in a Hibernate project and testing Liquibase for it�s usability
I have seen that currently persistence.xml files aren�t supported but will be in version
2.0 which is excellent (any idea when a final release is to be expected).
But another thing I�ve noticed is that in the diffDatabaseToChangeLog ant task it working
oke using the JPA annotations, but the @TableGenerator annotation is ignored.
I have defined for instance the following entity
@Entity
@Table(name=“Test2”)
@TableGenerator(name=“testGen”, table=“idgenerator”,
pkColumnName=“generatorKey”,
valueColumnName=“generatorValue”,
pkColumnValue=“testGen”)
public class Test2 {
@Id
@GeneratedValue(strategy=GenerationType.TABLE, generator=“testGen”)
private Integer id;
}
When running diffDatabaseToChangeLog against an db not containing the table Test2
but it does contain the idgenerator table though. It results in the following
changeset:
So the idgenerator table gets removed instead of maintained, this cannot be correct.
In case I specify a non-existing table generator table it isn�t created at all it seems like this is a bug.