So here is my question. I am creating a table that contains a SET data type column in mysql DB. I want to get the values โโof this column (SET).
I did all the connection configurations and everything works fine on my code.
How to get Set dataType using resultSet in Set java object ????
I have tried this.
Java bean code
public class Valeur {
private Long id;
private Set categoriesValues = new HashSet();
\\getters and setters for the id and the categoriesValues
}
ReultSet Code
private static Valeur map(ResultSet resultSet) throws SQLException {
Valeur valeur = new Valeur();
valeur.setId(resultSet.getLong("id"));
valeur.setCategoriesValues(resultSet.getString("categoriesValues"));
return valeur;
}
ResultSet works for identifier, but not for type Set.
thanks
Mitsu source
share