I am using Java 8 with JDBC mysql driver 5.1.45
I use a prepare statement to save data in the database , because sometimes I will need to insert null values into some columns, I decided to use setObject.
But it is not working as expected.
I am printing the values that are in my object, just to be sure those fields have data, I am able to see the field values.
But when the prepare statement is executed and the data is inserted into the database, some columns have the values that I was expecting. But many columns don't have the values that I was expecting to see, they appear with null values.
Any clue about what is happening and how to solve it?
The table where I was inserting the data had a insert trigger. This trigger was running a sql code that was messing the results. This was the problem.
I removed the trigger and now I am seeing in the table the data I was expecting to see.