liquibase-hibernate
liquibase-hibernate copied to clipboard
auto-increment not applied to changelog
Hi,
I have a class like this:
@MappedSuperclass
@Getter
@Setter
@EntityListeners(AuditEntityListener.class)
class TrackedEntity {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@CreatedOn
@Temporal(TemporalType.TIMESTAMP)
private Date creationDate;
@ModifiedOn
@Temporal(TemporalType.TIMESTAMP)
private Date modificationDate;
}
and all my entities are extending from TrackedEntity. The problem is that in generated changelogfile column id doesn't have auto-increment set to true. It looks like this:
<changeSet author="kgebert (generated)" id="1489058420150-1">
<createTable tableName="Building">
<column name="id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="creationDate" type="timestamp"/>
<column name="modificationDate" type="timestamp"/>
<column name="name" type="VARCHAR(255)"/>
<column name="complex_id" type="BIGINT"/>
</createTable>
</changeSet>
I am using MariaDB.
Am I missing something or it is a bug?
I'm seeing the same behaviour but not on columns with @Id