@BindQuery(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindField(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
int beginIndex = S.indexOfIgnoreCase(orderBySql,"ORDER BY ");
if(beginIndex >= 0){
orderBySql = S.substring(orderBySql, beginIndex+"ORDER BY ".length());
ORDER_BY(orderBySql);
}
}
```
生成的错误SQL如下:
SELECT DISTINCT self.*,r3.product_name AS **r3_product_name__**
FROM stock self
LEFT OUTER JOIN product_rel r3m ON self.product_id = r3m.orig_product_id
LEFT OUTER JOIN product r3 ON r3m.tmr_product_id = r3.id
WHERE (self.loc_id = #{ew.paramNameValuePairs.MPGENVAL1})
ORDER BY **new_product_name** DESC
新值
已经配置了如下查询绑定字段
```
@BindQuery(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindField(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindQuery(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindField(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
int beginIndex = S.indexOfIgnoreCase(orderBySql,"ORDER BY ");
if(beginIndex >= 0){
orderBySql = S.substring(orderBySql, beginIndex+"ORDER BY ".length());
ORDER_BY(orderBySql);
}
}
```
生成的错误SQL如下:
SELECT DISTINCT self.*,r3.product_name AS **r3_product_name__**
FROM stock self
LEFT OUTER JOIN product_rel r3m ON self.product_id = r3m.orig_product_id
LEFT OUTER JOIN product r3 ON r3m.tmr_product_id = r3.id
WHERE (self.loc_id = #{ew.paramNameValuePairs.MPGENVAL1})
ORDER BY **new_product_name** DESC
新值
已经配置了如下查询绑定字段
```
@BindQuery(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindField(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindQuery(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindField(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindQuery(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindField(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindQuery(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindField(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindQuery(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindField(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindQuery(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindField(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindQuery(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindField(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindQuery(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindField(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindQuery(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")
@BindField(entity = Product.class, field = "productName", condition = "this.product_id=product_x.old_part_id and product_x.loc_id=this.loc_id and product_x.new_product_id=id")