Hey guys,
I need some help here to clarify how I'm supposed to do this:
I have two models: Files and Courses. Files belongs to Course and has a CourseId field. At some point I needed to use transactions to validate both of them before inserting them, however, one of my validation rules for the File model verifies if the informed CourseId exists (it's useful in other cases where I don't use transactions) and this rule is flagged during the transaction because there's no CouseId during it, as we can all expect.
I think this could be fixed if I could dinamically disable the validation rule for the CourseId field, but apparently this is not possible yet. Another approach would be virtual fields, but this one is not quite "elegant".
How can I solve this?
Thanks!