RF# added automatic priority generation for entities with null priority