Fixed doctrine API related bugs in DB entity class