[schema] implements hash code of AbstractEntity
[db,tests] use a test database in integration tests