fix bug with retrieving entity with nested entities of same class
fix semanticPersistentEntity setEntityState