How to solve the following circular dependency error?
This is my class:
class QueueFactory extends \Magento\Framework\Model\AbstractModel
{
protected $syncQueueFactory;
public function __construct(
QueueFactory $syncQueueFactory,
array $data = []
) {
$this->syncQueueFactory = $syncQueueFactory;
$this->_queue = $this->syncQueueFactory->create();
...
Here, I want to declare syncQueueFactory of the model class QueueFactory
But if i give the same class in constructor naturally i get dependency error.
What is the alternate to use create()?