#17333·cphalcon

[NFR]: Can we have condition for parent model in belongsTo

Author: sanmayadCreated Apr 4, 2021Updated Sep 8, 2026
Labelsnew feature request7.0

So I have a DB doc_submitted which has two columns doc_type and doc_id where doc_type can refer to any table viz: assignment or task or book and doc_id will have respective id.

Now I want to write relationship in the DocSubmitted Model so I can refer them in view as doc_submitted.Assignment.topic or doc_submitted.Task.date.

If I'm putting the condition it's always searching in reference model instead of parent model.