【问题标题】:How resolve "unknown field 'TableField'如何解决“未知字段'TableField'
【发布时间】:2022-01-17 08:30:36
【问题描述】:

大家好,我在使用 SPEL - 灵活搜索时遇到问题,这是我点击按钮搜索进入实体时的错误日志:

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

这是我必须创建的查询:

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'

在图像中,我在 myExtension-items-core.xml 中创建的报告

【问题讨论】:

    标签: java sql spring hybris


    【解决方案1】:

    基于异常,很明显您指的是错误的产品属性是“inStockStatus”。 请替换为 {s.inStockStatus} 而不是 {p.inStockStatus}

    【讨论】:

    • 谢谢解决
    猜你喜欢
    • 2019-05-28
    • 2017-09-06
    • 1970-01-01
    • 2022-06-15
    • 1970-01-01
    • 2019-07-28
    • 1970-01-01
    • 2021-10-12
    • 2022-11-07
    相关资源
    最近更新 更多