CData JDBC Driver for Magento 2019 - Online Help
Questions / Feedback?

ProductCategories

CData JDBC Driver for Magento 2019 - Build 19.0.7354

Create, delete, and query the available categories for a specific product in Magento.

Select

The driver will use the Magento API to filter the results by ProductId while the rest of the filter is executed client side within the driver. The Magento APIs support only the equals (=) operator for ProductId.

For example, the following query is processed server side:

SELECT * FROM ProductCategories WHERE ProductId = 232
You can turn off client-side execution by setting SupportEnhancedSQL to false, in which case any search criteria that refers to any other columns will cause an error.

Insert

To assign a category to a specific product, provide the ProductId and CategoryId.

INSERT INTO ProductCategories(ProductId,CategoryId) VALUES (231,5)

Update

Magento does not allow product categories to be updated.

Delete

Product categories can be deleted by providing the CategoryId and ProductId and issuing a DELETE statement.

DELETE FROM ProductCategories WHERE ProductId=231 AND CategoryId=5

Columns

Name Type ReadOnly Description
CategoryId [KEY] Integer False

The Id of the category.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
ProductId String

The Id of the product.

 
 
Copyright (c) 2020 CData Software, Inc. - All rights reserved.
Build 19.0.7354.0