Change code to use table names from ORM constructor meta data