I would like to execute this query :
String query = "delete from table_a where id_table_a = ? and id_entity in ()";
PreparedStatement prepare = db_connection.prepareStatement(query);
prepare.setInt(1, var_a);
In the SQL query, I'm trying to put between the parentheses an attribute (defined as "id") of objects (defined as "Entity"). Objects "Entity" are contained in an ArrayList.
My goal is to put in a string all the "Entity.id" separated by commas. And then I will put this string between parentheses in my query.
I'd like to have advice cause I don't know if it's the better way to realize it...