fix setData, fix visibility of composite keys, start work for foreign keys