hasonethrough functioning for dynamicdb