How is devices.positionId updated?

brenthmiras8 years ago

When there is a new position received from a device,
it is inserted using this query (as stated in docs):


<entry key='database.insertPosition'>
    INSERT INTO positions (deviceId, protocol, serverTime, deviceTime, fixTime, valid, latitude, longitude, altitude, speed, course, address, attributes)
    VALUES (:deviceId, :protocol, :now, :deviceTime, :fixTime, :valid, :latitude, :longitude, :altitude, :speed, :course, :address, :attributes);
</entry>

Is there an entry for a query where device's positionid is updated?
If not then how is it updated?

My main goal is to update the positionId of my custom table associated with devices that is why Im asking this. I'm open to other suggestions.

abyss8 years ago

It is updated in database.updateLatestPosition https://github.com/tananaev/traccar/blob/master/setup/default.xml#L196