correctly deal with DDB primarykeys