Hello,
When I run mvn compile liquibase:diff, the changeSet generated contains the creation of a table instead of a view. How liquibase identifies views in java code ?
The java class:
@Entity
@Table(name = "CarView")
@Immutable
public class CarView {
@Id
@Column(name = "idCar", nullable = false)
private String id;
@Column(name = "color")
private String color;
}
The changeSet generated:
<changeSet author="ME" id="ID1">
<createTable tableName="CarView">
<column name="idCar" type="nvarchar(255)">
<constraints nullable="false" primaryKey="true" primaryKeyName="CarViewPK"/>
</column>
<column name="color" type="nvarchar(255)"/>
</createTable>
</changeSet>
And likewise, if I create view manualy, it generates:
<changeSet author="MY" id="ID2">
<dropView viewName="CarView"/>
</changeSet>
Thanks for your help