I have two models:
Model A and Model B. Both have a name attribute, on model A it's required, on B its optional. If the attribute is not null on B, i want to return this attribute. But if it's null, I want to return the inherited name from Model A in Model B.
ModelA->name: schmidtflo ModelB->name: othername --> ModelB[name] = othername ModelA->name: schmidtflo ModelB->name: null --> ModelB[name] = schmidtflo
I can't find a solution how to define my accessor for that specific problem. Would be fine if you can help me.