Relationships with multiple relations

I need to define a relationship:

global.firstID = firstID;

so far ok…

but I also need:

global.secondID = secondID OR “” = secondID.

(How) can I do this?