Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-increment not applied to changelog #148

Open
karolgebert opened this issue Mar 9, 2017 · 1 comment
Open

auto-increment not applied to changelog #148

karolgebert opened this issue Mar 9, 2017 · 1 comment

Comments

@karolgebert
Copy link

karolgebert commented Mar 9, 2017

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?

┆Issue is synchronized with this Jira Bug by Unito

@aps-augentictech
Copy link

I'm seeing the same behaviour but not on columns with @id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants