Description
I use Oracle with the following in my persistence.xml:
<property name="openjpa.jdbc.Dictionary" value="(BitTypeName=CHAR(1),BooleanTypeName=CHAR(1),BooleanRepresentation=STRING_10)"/>
It is all about the *TypeName. The BooleanRepresentation has no impact. I just added it to show the full use case.
The problem is that during the MappingTool retain there is a Column#equalsColumn which only looks at the Type integers but not on any typeName representation in the DBDictionary.
What now happens is that during openjpa:sql with sqlAction=build it perfectly creates a CHAR(1) for every boolean and Boolean field in my entity.
But during a sqlAction=refresh it wrongly believes that the types it gets from the SchemaTool by parsing the real db (CHAR length1 java.sql.Types#CHAR=1) is not compatible to the type it sees in the MappingTool from parsing the Entity annotations + orm.xml (java.sql.Tpyes.BIT=-7).
The result is that generated delta script wrongly drops the column and later adds it again with exactly the same definitions. And this happens every time...