Closed romanmatyus closed 3 years ago
You don't have to care whether the relationship is stored on Order
side, just filter by the property of entity from current side. Where is the relationship stored orm knows from isMain=true
$this->orm->bankTransactions->findBy([
'order' => null,
])
Btw, did you know there is an IntelliJ plugin that can help you with that syntax? https://github.com/nextras/orm-intellij
Mabar's answer should be the answer. Thanks!
I have table
BankTransaction
with operations on bank account.Next table is
Order
. Order is specific, is always payed only with max one transaction.Transaction can be paired with Order, but not necessarily.
Is possible filter all
BankTransation
where is not paired toOrder
?Something like this (inspired by Nette Database Explorer):
Thanks!