Re: Metadata aren't correct
Posted by: Mark Matthews
Date: May 06, 2005 09:17AM wrote:
> Mark,
> The problem we have with 3.1.x connectors and
> hibernate:
> We have a field defined as follows:
> IS_DEMO char default 0 NULL
> And the all records has 0 for this field. But
> hibernate is giving this exception:


I'd have to see the query that Hibernate is generating and the data for the table in question, however it looks like you have a programming error. What is the _java_ field type for isDemo? If it's a primitive (such as boolean), you can't have NULL assigned to it.

I'm not sure why this would work with Connector/J 3.0.x but not Connector/J 3.1.x, except that Connector/J 3.0.x would return '0' for _empty_ (not NULL_) fields by default, and Connector/J 3.1.x doesn't (but throws an exception, so my guess is that's not the problem here). Maybe there was a bug in Connector/J 3.0 that caused ResultSet.wasNull() to not be accurate in your case, and it's fixed in Connector/J 3.1?


Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools

Options: ReplyQuote

Written By
May 06, 2005 08:11AM
May 06, 2005 08:29AM
May 06, 2005 08:57AM
Re: Metadata aren't correct
May 06, 2005 09:17AM
May 06, 2005 09:36AM
May 06, 2005 08:58AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.