Fixed problem with primary key on Entity