fixed entities relationships, added some methods to DAO