mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge branch 'application-mgt-new' into 'application-mgt-new'
Add return generated keys flag See merge request entgra/carbon-device-mgt!334
This commit is contained in:
commit
b7cb0718f1
@ -26,6 +26,7 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
@ -175,7 +176,7 @@ public class SQLServerSubscriptionDAOImpl extends GenericSubscriptionDAOImpl {
|
||||
+ "VALUES (?, ?, ?, ?, ?, ?, ?)";
|
||||
try {
|
||||
Connection conn = this.getDBConnection();
|
||||
try (PreparedStatement stmt = conn.prepareStatement(sql)) {
|
||||
try (PreparedStatement stmt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
Timestamp timestamp = new Timestamp(calendar.getTime().getTime());
|
||||
List<Integer> deviceSubIds = new ArrayList<>();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user