#JC-1512 Mapping entties to database.