wprk14
DTDrizzle Team
•Created by wprk14 on 10/16/2023 in #help
Many -> Many relation with additional where clause to make it One > Many
I'm trying to work out if this is possible. I have the following DB schema:
This is a simplified version of the schema but essentially from the payment_plan_assets table I want a relation where I can get just the current (the record with highest revision value) where the initialRevisionId matches.
I think I can get it to work using a where clause in the
with
property when I query it but then I need to add the where clause into everywhere I use the relationship. Is it possible to have it just defined in the schema?1 replies