src/Leevel/Database/Ddd/Entity.php
public function isRelation(string $prop): bool
    {
        $prop = $this->normalize($prop);

        $this->validate($prop);

        $struct = static::STRUCT[$prop];

        if (isset($struct[self::BELONGS_TO]) ||
           isset($struct[self::HAS_MANY]) ||
           isset($struct[self::HAS_ONE]) ||
           isset($struct[self::MANY_MANY])) {
            return true;
        }

        return false;
    }
public function isRelation(string $prop): bool
    {
        $prop = $this->normalize($prop);

        $this->validate($prop);

        $struct = static::STRUCT[$prop];

        if (isset($struct[self::BELONGS_TO]) ||
           isset($struct[self::HAS_MANY]) ||
           isset($struct[self::HAS_ONE]) ||
           isset($struct[self::MANY_MANY])) {
            return true;
        }

        return false;
    }
是否为关联属性.

@param string $prop

@return bool