by joachim: Added support for entity schema properties that refer to other entities.