I’m already applying that and it works as if the integer value from the database is 0, the java boolean variable becomes false and vice versa. But I’m wondering if it’s possible to have it the other way around to map 0 for true and 1 for false.
Which got me thinking, i’ve earlier mapped java enums to integers which is pretty well explained in the documentations and I’m wondering if Datanucleus is flexible enough to map any database type to any java type when either persisting the value or loading it. For example, to map database database below a specified value to java boolean false and exceeding that value to java boolean true. Or mapping strings to integers (string length may be).
Perhaps you just use standard JDO metadata and define the “jdbc-type” and see what happens. I wouldn’t have thought its feasible to support every possible combination (and indeed many of them would be just plain daft).