How about using EntityAPI here?