I have an issue with querying "unique identifiers" from SQL Server and I'm looking for advice on a work-around.
Using the Microsoft JDBC Driver I connect directly to the database and try to query a unique identifier field. Using the ResultSet.getString call, I get the guid in lower case. For a number of reasons, technical and business, I'm told I have to have them in upper case. I've tried all the other getter methods in ResultSet and can't get it that way. So fine, I'll upper case it after I read it, right?
How do I do that in a CMP bean? The bean property is a String. Can I do something in the deployment descriptor to get JBoss to apply a function to the string? Do I have to subclass all of the MS JDBC classes and catch this one case in the getString method? Is there something I can do in the type mapping xml that JBoss uses to decide this is a String? Is there some way I can provide an implementation of the bean property getter function that uppercases the string?
I'm at a loss. The only solution I think I can actually do is to provide my subclassed version of a JDBC driver. I don't really like that solution. Please help.
Ok, I resolved my issue on my own. I've started using the jTDS driver which returns GUIDs in upper case. I can't understand why Microsoft's wouldn't.