Reputation: 157
I have a table with a JSON column and when I run my tests with the 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.
my dataset:
<?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>
Obs: my tables already exists in the database.
Upvotes: 3
Views: 1777
Reputation: 7652
You can do it with trick:
<hero
id="000580548"
json="{"id" : 1,"name" : "mySuperHero"}"
/>
It's work for us.
Upvotes: 0
Reputation: 71
By default DbUnit does not understand json field setup. Either you omit it in tests or write custom extension for DbUnit
Upvotes: 2