I’m using the com.mgmtp.a12.dataservices.internal.query.QueryService from the Query API to query data. There is a condition in my query like the following:
ExactMatchOperator.builder()
.field("/OrderItemMasterData/DataHubArticleId")
.value("123")
.build()
The point is that I don’t want to specify the field path “/OrderItemMasterData/DataHubArticleId” as a string, because the source compilation would still be successful even if my model changes.
Is there a way to do this programmatically? Something like: OrderItem_DM.orderItemMasterData().dataHubArticleId().getPath().
There is a similar way that I use to set the value to the field when creating a DocumentV2. E.g:
OrderItem_DM._empty()._with(
OrderItem_DM._pointer().orderItemMasterData().dataHubArticleId(),
"123"
)._unwrap()
where the OrderItem_DM._pointer() is generated by the lib com.mgmtp.a12.kernel.kernel-md-typed-accessor-gen