add a getDeviceID in DBtransaction to get latest deviceID