Thank you Tomáš.
Ok, so Filtered relationship could be used for example to filter data into different “Tabs” on the screen based on Constant Values or default parameters if I understand it well. So there is no way to pass to the Data Structure dynamic filter based on certain values from the parent.
In my case I resolved that using View which connected RepairOrder and other RepairOrder using column Serial Number and excludes relationship to itself.
RepairOrder ro INNER JOIN RepairOrder roh ON ro.SerialNumber = roh.SerialNumber and ro.Id <> roh.Id
In Origam Model:
- I configured view using Deployment Script Generator (option Missing in Model)
- I added relationship from RepairOrder entity into V_RepairOrderHistory (
roh.refRepairOrderId = ro.Id)
- I added relationship from V_RepairOrderHistory into RepairOrder (
roh.refHistoryRepairOrderId = ro2.Id)
- Into Data Structure I added Cascade
RepairOrder → (Normal RelationType) →
V_RepairOrderHistory → (inner join) →
- This allows me to now add as many fields from RepairOrder entity only in model and no need to modify view
Other option could be to have all fields for history in view and have just relationship
V_RepairOrderHistory. May be there could be easier manipulation with the entity. But I wanted to use existing structure and configurations of fields from Entity RepairOrder.