Fix sqlite dapter to work with TKey.