mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Expose orderInstructionsJoinOrder on order table; flip orderInstructionsJoinOrder (to expose bug covered in testFlippedJoinForOnClause
This commit is contained in:
@ -273,6 +273,7 @@ public class TestUtils
|
|||||||
.withJoinNameChain(List.of("orderInstructionsJoinOrder")))
|
.withJoinNameChain(List.of("orderInstructionsJoinOrder")))
|
||||||
.withField(new QFieldMetaData("orderId", QFieldType.INTEGER).withBackendName("order_id"))
|
.withField(new QFieldMetaData("orderId", QFieldType.INTEGER).withBackendName("order_id"))
|
||||||
.withField(new QFieldMetaData("instructions", QFieldType.STRING))
|
.withField(new QFieldMetaData("instructions", QFieldType.STRING))
|
||||||
|
.withExposedJoin(new ExposedJoin().withJoinTable(TABLE_NAME_ORDER).withJoinPath(List.of("orderInstructionsJoinOrder")))
|
||||||
);
|
);
|
||||||
|
|
||||||
qInstance.addTable(defineBaseTable(TABLE_NAME_ITEM, "item")
|
qInstance.addTable(defineBaseTable(TABLE_NAME_ITEM, "item")
|
||||||
@ -395,8 +396,8 @@ public class TestUtils
|
|||||||
|
|
||||||
qInstance.addJoin(new QJoinMetaData()
|
qInstance.addJoin(new QJoinMetaData()
|
||||||
.withName("orderInstructionsJoinOrder")
|
.withName("orderInstructionsJoinOrder")
|
||||||
.withLeftTable(TABLE_NAME_ORDER_INSTRUCTIONS)
|
.withRightTable(TABLE_NAME_ORDER_INSTRUCTIONS)
|
||||||
.withRightTable(TABLE_NAME_ORDER)
|
.withLeftTable(TABLE_NAME_ORDER)
|
||||||
.withType(JoinType.MANY_TO_ONE)
|
.withType(JoinType.MANY_TO_ONE)
|
||||||
.withJoinOn(new JoinOn("orderId", "id"))
|
.withJoinOn(new JoinOn("orderId", "id"))
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user