changes in sqlitepersist to reolve foreign keys