Making models compatible with SQLAlchemy > 0.8.1

Change-Id: I245e40138fd76754d928fa67cfd7647342d8743f