将 SubstituteKey 与 Joined Table 结合使用
Using SubstituteKey with Joined Table
我有一个以这种方式定义的选择器:
[PXSelector(typeof(Search2<TableA.id, LeftJoin<TableB, On<TableB.refNbr, Equal<TableA.refNbr>>>,
Where<TableA.woid, IsNull, And<TableB.tranType, Equal<TranType>, And<TableB.lotSerialNbr, NotEqual<StringEmpty>>>>>),
typeof(TableA.id), typeof(TableB.lotSerialNbr), SubstituteKey = typeof(TableB.lotSerialNbr))]
但是选择器不显示 SubstituteKey 值。我可以分配属于连接 table 的 SubsistiteKey 而不是原始 table 和 show/fetch 的值吗?
不支持将 SubsistiteKey 分配给连接的 table 字段。作为替代方案,我建议在 TableA 中声明一个未绑定字段,并使用 PXDBScalarAttribute 对其进行修饰,以在数据库级别计算其值:
[PXDBScalar(typeof(Search<TableB.lotSerialNbr, <TableB.refNbr, Equal<TableA.refNbr>>>))]
我有一个以这种方式定义的选择器:
[PXSelector(typeof(Search2<TableA.id, LeftJoin<TableB, On<TableB.refNbr, Equal<TableA.refNbr>>>,
Where<TableA.woid, IsNull, And<TableB.tranType, Equal<TranType>, And<TableB.lotSerialNbr, NotEqual<StringEmpty>>>>>),
typeof(TableA.id), typeof(TableB.lotSerialNbr), SubstituteKey = typeof(TableB.lotSerialNbr))]
但是选择器不显示 SubstituteKey 值。我可以分配属于连接 table 的 SubsistiteKey 而不是原始 table 和 show/fetch 的值吗?
不支持将 SubsistiteKey 分配给连接的 table 字段。作为替代方案,我建议在 TableA 中声明一个未绑定字段,并使用 PXDBScalarAttribute 对其进行修饰,以在数据库级别计算其值:
[PXDBScalar(typeof(Search<TableB.lotSerialNbr, <TableB.refNbr, Equal<TableA.refNbr>>>))]