This is my ui component file content:
and this is my DataProvider:
namespace VendorModuleNameModelShippingMethods;
use VendorModuleNameModelResourceModelShippingMethodsCollectionFactory;
class DataProvider extends MagentoUiDataProviderAbstractDataProvider
{
protected $_loadedData;
public function __construct(
$name,
$primaryFieldName,
$requestFieldName,
CollectionFactory $employeeCollectionFactory,
array $meta = [],
array $data = []
) {
$this->collection = $employeeCollectionFactory->create();
parent::__construct($name, $primaryFieldName, $requestFieldName, $meta, $data);
}
public function getData()
{
if (isset($this->_loadedData)) {
return $this->_loadedData;
}
$items = $this->collection->getItems();
.......
}
}
If I display my query string in the getData()
with echo $this->collection->getSelect();
, the result is:
SELECT `main_table`.* FROM `mytable` AS `main_table` WHERE (`entity_id` = '') . My id is missing. Not sure how, any idea where to look ? Thnx in advance