Home > OS >  How resolve "unknown field 'TableField'
How resolve "unknown field 'TableField'

Time:12-16

Hi guys I have a problem with SPEL - Flexible Search, this is my error log when into my entity I click on button search:

ERROR [hybrisHTTP6] [PagingDelegateController] cannot search unknown field 'TableField(name='inStockStatus',langPK='null',type=Product)' within type Product unless you disable checking 

and this is the query that I must create :

select {p.code},{p.description},{bs.uid}, (CASE WHEN ({p.onlineDate} is not null AND {p.onlineDate} > current_timestamp ) THEN 1 else 0 END)
from {Product as p join StockLevel as s on {s.productCode} = {p.code} join BaseStore2WarehouseRel as b on {b.target} = {s.warehouse} join BaseStore as bs on {bs.pk} = {b.source}}
where {bs.uid} in ('baseStorePk')

and {p.code} = '?productCode'
and {p.description} = '?description'
and {p.descriptionCics} = '?descriptionCics'
and {p.onlinedate} <= '?onlineDateFrom'
and {p.onlinedate} >= '?onlineDateTo'
and {s.inStockStatus} = '?inStockStatus'
and {p.doneBy} = '?doneBy'
and {s.outOfStockCause} = '?oosCause'
and {p.department} = '?department'
and {p.grm} = '?grm'

and in the image the report that I have create into myExtension-items-core.xml enter image description here

CodePudding user response:

based on Exception it's clear you are referring wrong attribute of product is "inStockStatus". please replace with {s.inStockStatus} instead of {p.inStockStatus}

  • Related