AAAARRRRRGGGGHHHHH! I've been working on a problem with Castor JDO 0.9.4.1 for several hours now. I have a class that represents a simple table. It has 3 columns, one of which is a char(1) in my database. I am mapping that in to a String in my Java class.
The problem that I've been having is that I wanted to tread the char(1) column as a boolean with getLock and isLock accessor methods but really store it as a String behind the scenes. However, Castor JDO doesn't like that at ALL! I had to change the code so that it was using getLock and setLock with the appropriate String types. It took me FOREVER to figure that out, because I didn't realize it was a problem with the class. Castor JDO apparently looks at every class in the mapping file at the time it loads its configuration and not just when the class is first used.
The problem showed up in my application as a NullPointerException right after I loaded the configuration with JDO.loadConfiguration().
4:07:22 PM
|