my application use jhipster with mysql and liquibase, and mysql version is 5.7.20 which support json column, and I use ObjectMapper to map json column and java object, and it works, the column type is json, but when the liquibase in involved (./mvnw package -Pprod dockerfile:build), there will be exception like "unknown data type 'JSON'" and the test will be failed, no docker image generated.
I change a bit in 20180410012441_added_entity_Ability.xml for that json column:
<column name="abilities" type="json">
<constraints nullable="true"/>
</column>
in my domain class, the json related field is like:
@Type(type = "json")
@Column(columnDefinition = "json")
private List<Skill> abilities = new ArrayList<>();
I suspect the problem is related for that xml column/type definition, liquibase does not support json keyword, I have no idea what should be there for correct type.
Could someone help please? very appreciated.
========================================================= update 9:01 PM Beijing time I add a changeSet as "
<changeSet id="20180415081741-1" author="jhipster">
<sql dbms="mysql" endDelimiter="\nGO" splitStatements="true"
stripComments="true">ALTER TABLE `ability` ADD `abilities` json DEFAULT NULL</sql>
</changeSet>
then I issue "./mvnw package -Pprod dockerfile:build", another exception which seemingly hibernate related:
2018-04-15 20:56:52.186 ERROR 23936 --- [ main] o.h.metamodel.internal.MetadataContext : HHH015007: Illegal argument on static metamodel field injection : com.james.app.domain.Ability_#abilities; expected type : org.hibernate.metamodel.internal.SingularAttributeImpl; encountered type : javax.persistence.metamodel.ListAttribute