JDBC Driver for Magento

Build 22.0.8462

ProductMedia

ProductMedia is an auto generated table

Select

You must specify the Sku_p column in the WHERE clause to retrieve results from ProductMedia. Sku_p can be used only with the equals (=) operator.

The driver will use the Magento API to filter the results by Sku_p while the rest of the filter is executed client side within the driver. For example, the following query is processed server side:

SELECT * FROM [ProductMedia] WHERE Sku = 'sjl-8082'
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.

Update

To update a ProductMedia record, you must set Sku and EntryId (refers to the Id column).

UPDATE ProductMedia SET Label = 'lbl new' WHERE EntryId = '1' AND Sku = 'sjl-8082'

Delete

Product media can be deleted by providing Sku_p and EntryId_p (refers to the Id column).

DELETE FROM ProductMedia WHERE EntryId = 1 AND Sky = 'sjl-8082'

Columns

Name Type ReadOnly Description
Id [KEY] Int False

Gallery entry ID

Content String False

This is an auto-generated column

Disabled Bool False

If gallery entry is hidden from product page

ExtensionAttributes String False

This is an auto-generated column

File String False

File path

Label String False

Gallery entry alternative text

MediaType String False

Media type

Position Int False

Gallery entry position (sort order)

Types String False

Gallery entry image types (thumbnail, image, small_image etc)

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
Sku_p String

This is an auto-generated column

EntryId_p Int

This is an auto-generated column

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462