Closed harshad-sat closed 2 years ago
corrected it myself
Object[] objArry={taco.getName(), new Timestamp(taco.getCreatedAt().getTime())}; PreparedStatementCreator psc = new PreparedStatementCreatorFactory( "insert into Taco (name, createdAt) values (?, ?)", Types.VARCHAR, Types.TIMESTAMP ).newPreparedStatementCreator( Arrays.asList(objArry));
Not sure why it gives compilation error if this objArr is passed directly
getting compilation error in saveTacoInfo method for Arrays.AsList he method asList(Object) in the type Arrays is not applicable for the arguments (String, Timestamp)