我有一个带有JSON列的表,当我使用dataset运行测试时。
org.dbunit.dataset.NoSuchColumnException: hero.JSON - (Non-uppercase
input column: json) in ColumnNameToIndexes cache map. Note that the map's
column names are NOT case sensitive.我的数据集:
<?xml version="1.0" encoding="UTF-8"?>
<dataset>
<hero id='000580548' json='{"id" : 1,"name" : "mySuperHero"}'/>
<hero_profile id='000580548-mySuperHero' json='{"habilities": [], "stars" : 7}'/>
</dataset>我的表已经存在于数据库中了。
发布于 2015-09-29 15:13:49
默认情况下,DbUnit不理解json字段设置。要么在测试中省略它,要么为DbUnit编写自定义扩展
发布于 2017-10-13 11:51:25
你可以用戏法来做:
<hero
id="000580548"
json="{"id" : 1,"name" : "mySuperHero"}"
/>这是我们的工作。
https://stackoverflow.com/questions/31920533
复制相似问题