How to define boolean attributes in my extension

I am trying to write a Liquibase extension with a tag that has a boolean attribute.

The XSD for that change looks like this:

    … 8 more

I also tried to define the instance variables as Boolean. In that case the error during runtime goes away, but my property is never populated with the value from the changeSet.

What am I missing here?

There is no built-in automatic conversion from String to Boolean or boolean - although there are utility methods to help with that. 

I haven’t tried this, so I am not 100% sure, but the most likely thing is that you should change the signature of setBaseType so that it takes a String, and then use the Boolean.parseBoolean(String) method to parse the string ‘true’ into the booloean value true.


Steve Donie
Principal Software Engineer
Datical, Inc.