I'm reading data from a table( from a MySQL Database) with Hibernate SQL Query.
The thing is, the table contains a colum that is mapped to a char in Hibernate Model, and sometimes this column is empty.
And I suppose this is where my exception comes from.
How can I map a colum of char to my hibernate model without getting this error ?
Thanks for your answers !

---

Thank you for your answer !
My column is not nullable (I 'm using MySQL and this column is NOT NULL)
Then, I don't think that 

```
if (str == null) {

```

is appropriate.

the error is : 

```
15:30:35,289  INFO CharacterType:178 - could not read column value from result set: LSFUS11_20_; String index out of range: 0

```

which results in the following exception :

```
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    at java.lang.String.charAt(String.java:558)

```

I think I may try your solution, but with : 

```
if (str == "") {

```

since it can't be null, it's just an empty String.

Thanks for your piece code, I'm going to try that !