Hey Brian, got another one for you
I'm trying to do a many-to-many join, so I need 2 join statements. From what I can tell, it's not currently possible:
var query = utils.selectAsMap(products, req.fields)
.from(products
.join(productsProductCategories)
.on(productsProductCategories.productId.equals(products.id))
.join(productCategories) // fail
.on(productCategories.id.equals(productsProductCategories.productCategoryId))
)
.where(products.id.equals(req.param('productId')))
.toQuery();
The problem is that on doesn't continue the chain.
🍺
Hey Brian, got another one for you
I'm trying to do a many-to-many join, so I need 2 join statements. From what I can tell, it's not currently possible:
The problem is that
ondoesn't continue the chain.🍺