Can I have only one to many association between persistable and OQL View entity? I have a entity quality order , for that there will be multiple documents. I just want a one to one asssociation between quality order entity and OQL entity(which shows me the count of documents for every quality order) So using the below query, but still it has one to many association which makes it difficult while retrieving SELECT q.ID AS QODocumentHelper_QualityOrder, COUNT(dq.ID) AS DocumentCount FROM Quality.QualityOrder AS q LEFT JOIN q/Factory.DocumentInfo_QualityOrder/Factory.DocumentInfo AS dq GROUP BY q.ID Might be a small issue, but will be useful in long run. Any info is useful, thanks!
asked
Rishi Sundar
1 answers
0
You may use a subquery to get the document count. Check the OQL documentation, there is an example of a sub query. Or create a separate view entity that returns the document count and the QualityOrder association. Then join that view entity in your main view entity.