使用代码创建Hybris storefront订单时遇到错误No result for the given example [TitleModel (&

错误消息如下图所示:

“No result for the given example [TitleModel (<unsaved>)] was found. Searched with these attributes: {code=Mr}”

使用代码创建Hybris storefront订单时遇到错误No result for the given example [TitleModel (&

我解决这个问题的思路是,先在postman里用user read的API读取一个系统存在的user,查看title code长什么样:

使用代码创建Hybris storefront订单时遇到错误No result for the given example [TitleModel (&

执行API,发现返回的结果里,titleCode的mr是大小写相关的,而我代码里传入的是Mr. 我改成mr之后,问题消失。

使用代码创建Hybris storefront订单时遇到错误No result for the given example [TitleModel (&

要获取更多Jerry的原创文章,请关注公众号"汪子熙":
使用代码创建Hybris storefront订单时遇到错误No result for the given example [TitleModel (&