You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I might be doing something wrong, but It seems that the InsertBuilder.values() is not able to know previous added input values.
Given the following code:
List<User> users = someResourceProvider.getAllMyUsers(); // lets suppose that I have only two usersInsertBuilderinsertBuilder = InsertBuilder.into("myTable").columns("name","phone");
users.forEach(user -> insertBuilder.values(user.getName(),user.getPhone());
Stringquery = insertBuilder.build().getQuery().toString();
I was expecting String query to contain something similar to this:
INSERT INTO myTable (name,phone) VALUES (?,?) , (?,?);
However I'm getting this output:
INSERT INTO myTable (name,phone) VALUES (?,?) VALUES (?,?);
Am I missing something?
It might be the case that I misinterpreted what InsertBuilder.values() is supposed to do.
I would appreciate some feedback.
Thank you very much for your time.
Cheers.
I might be doing something wrong, but It seems that the
InsertBuilder.values()is not able to know previous added input values.Given the following code:
I was expecting
String queryto contain something similar to this:However I'm getting this output:
Am I missing something?
It might be the case that I misinterpreted what
InsertBuilder.values()is supposed to do.I would appreciate some feedback.
Thank you very much for your time.
Cheers.