case sensitiv

stmt = conn.prepareStatement(sql, new String[]{"ID"}) this line makes case sensitive issues, an exception saying 'ID' does not exist while using the postgreSQL.
merge-requests/1/head
Thomson Ignesious 8 years ago committed by GitHub
parent 39a7037821
commit 0621579d25

@ -47,7 +47,7 @@ public class GroupDAOImpl implements GroupDAO {
try {
Connection conn = GroupManagementDAOFactory.getConnection();
String sql = "INSERT INTO DM_GROUP(DESCRIPTION, GROUP_NAME, OWNER, TENANT_ID) VALUES (?, ?, ?, ?)";
stmt = conn.prepareStatement(sql, new String[]{"ID"});
stmt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
stmt.setString(1, deviceGroup.getDescription());
stmt.setString(2, deviceGroup.getName());
stmt.setString(3, deviceGroup.getOwner());

Loading…
Cancel
Save