MySQL >5.0.18 and Connector/J 5.0.4 weirdness
"Christopher G. Stach II" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Message-ID | <[email protected]> |
I wish that I had more information than I currently do, but here goes: We're using Hibernate 3.2.0GA, and we noticed that certain classes "can't be instantiated" from the database. Hibernate uses a CASE statement to determine which polymorphic class to instantiate. The concrete class' value is 4 and the abstract class' value is 2. This works most of the time; however, on MySQL server versions >5.0.18, regardless of whether it's Connector/J 5.0.3 or 5.0.4, it keeps picking 2 instead of 4. Running the SQL manually always works correctly. I've been debugging this for a while, and the ResultSet definitely has 2 in rowData/thisRow. The metadata seems to be working because it finds the correct columnIndex based on the correct name. Sometimes the row will be selected correctly, and sometimes it won't. This led me to believe that it was caching in the driver. I have disabled all of the driver caching (I think), but nothing changed. -- Christopher G. Stach II -- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/[email protected]