src/Leevel/Database/Ddd/UnitOfWork.php
public function create(IEntity $entity, int $priority = 500): IUnitOfWork
    {
        $this->createEntity($entity);

        $id = spl_object_id($entity);
        $this->createsFlag[$id] = $priority;

        return $this;
    }
public function create(IEntity $entity, int $priority = 500): IUnitOfWork
    {
        $this->createEntity($entity);

        $id = spl_object_id($entity);
        $this->createsFlag[$id] = $priority;

        return $this;
    }
注册新建实体.

@param \Leevel\Database\Ddd\IEntity $entity
@param int                          $priority

@return $this