Relation between InventTrans and InventTableModule
Your description isn't sufficient. It's not enough to know that you want a unit; you need to decide which unit you want. For example, you may always want the inventory unit, or you want a unit based on the origin of the transaction. It depends on the business scenario.
Assuming you want the inventory unit, a simple solution is using inventUnit() display method of InventTrans, but it's not ideal for performance. Nevertheless it tell us you what relation you should use. Next time, check the existing logic before trying to figure it by yourself (and struggling with it).
Creating a table relation is possible, but you're wrong in thinking that's the only option. Consider these two approaches as well:
- Use addLink() to create a join condition in code, even if a table relation exist.
- You can add InventTable data source in between those two tables and utilize existing locations.
Regarding cardinality, there may be many inventory transactions for a given item. There may from zero to three records in InventTableModule, but if you restrict it to a specific module type, it may be zero or one.