use isKindOfEntity instead of isEqual so sub entities work properly