core data model mapping of attribute based on attribute of other entity <p>i have a data model with two entities with a one-to-many relationship</p> <pre><code>Person { name:string, type:number, files&lt;--&gt;&gt;File } File { reference:string, person&lt;&lt;--&gt;Person } </code></pre> <p>i have updated the data model, removed the type attribute from Person, but the reference attribute of the File is dependent on the type of the Person : if type is 0, then reference must be "A", if type is 1, then the reference must be "B".</p> <p>I cannot find a solution that can perform this mapping. Any idea's ?</p> <p>EDIT :</p> <p>I found a solution by creating two entity mappings, using the filter predicates to distinguish between type 0 and 1. For entity mapping with Person.type == 0, i set a hard coded attribute mapping of "A", and similar for type == 1></p>