[英]Is there a SimpleJdbcInsert method similar to usingColumns(), which takes excluded columns list as an argument?
SimpleJdbcInsert has a method usingColumns(String...), where you define set of columns, included in the insert statement. SimpleJdbcInsert有一个usingColumns(String ...)的方法,您可以在其中定义包含在insert语句中的一组列。
But sometimes an opposite functionality is preferred, like while having a 25-column table with one autogenerated column (eg timestamp set to current date/time) one would prefer to mention this one column as excluded from insert, instead of mentioning 24 columns. 但是有时候,相反的功能是更可取的,例如在具有一个自动生成的列的25列表中(例如,将时间戳设置为当前日期/时间),人们宁愿将这一列从插入中排除,而不是提及24列。
The question is, is there a way (another method or workaround) to provide excluded columns list instead of included columns? 问题是,是否有一种方法(另一种方法或解决方法)提供排除列列表而不是包括列?
The question is, is there a way (another method or workaround) to provide excluded columns list instead of included columns?
问题是,是否有一种方法(另一种方法或解决方法)提供排除列列表而不是包括列?
That you can achieve by using SimpleJdbcInsert.usingGeneratedKeyColumns(String...) method. 您可以通过使用SimpleJdbcInsert.usingGeneratedKeyColumns(String ...)方法来实现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.