/** * Here comes the magic, generation a where restriction out of the passed property name and the comparator * * @return string * @throws class_orm_exception */ public function getStrWhere() { $objReflection = new class_reflection($this->getStrTargetClass()); $strPropertyValue = $objReflection->getAnnotationValueForProperty($this->strProperty, class_orm_base::STR_ANNOTATION_TABLECOLUMN); if ($strPropertyValue == null) { throw new class_orm_exception("Failed to load annotation " . class_orm_base::STR_ANNOTATION_TABLECOLUMN . " for property " . $this->strProperty . "@" . $this->getStrTargetClass(), class_exception::$level_ERROR); } return " AND " . $strPropertyValue . " " . $this->objComparator->getEnumAsSqlString() . " ? "; }