Open undjike opened 3 years ago
Pls, need help 🙏
@topclaudy, what about this?
@undjike Some people have requested different association logics. Can you please explain the use case(s) for this?
OK, let me explain. I have a transaction table with some fields
When we have a transfer, both deposit and withdrawal are performed in the accounts concerned by the operation. So, this is the structure of the transfer table...
Then, when I'm to retrieve (with eager loading) the transfer associated to a transaction, I have to join using transaction.id = transfer.withdraw_id
or transaction.id = transfer.deposit_id
.
That's the point.
@undjike Thanks for the explanation. Please check discussion on https://github.com/topclaudy/compoships/issues/76 and https://github.com/topclaudy/compoships/issues/67. Such features are not on the roadmap.
Would really like to be able to use OR. But i can see why it could be a pain to add due to associating models.
Please, is it possible to use OR in the association?