Would it be possible to have all three entities use the same generalisation? Then you can create an association from your trace table to the entity all other entities use as generalisation.
If this is not possible, you could use a string or long integer column in your trace table. If you create a Java action that has an anyObject parameter and returns a long or string, you can get the guid in Java. Maybe someone else can help you with a better way to get the guid.
Or: could the audit trail module from the appstore help you trace your objects?
If you need to generate a GUID:
import java.util.UUID; import com.mendix.systemwideinterfaces.core.UserAction;
/** * This action will generate a GUID that can be associated with an Obejct of Choice. */ public class GenerateGUID extends UserAction<string> { public GenerateGUID() { super(); }
@Override
public String executeAction() throws Exception
{
// BEGIN USER CODE
UUID idOne = UUID.randomUUID();
return String.valueOf(idOne);
// END USER CODE
}
/**
* Returns a string representation of this action
*/
@Override
public String toString()
{
return "GenerateGUID";
}
// BEGIN EXTRA CODE
// END EXTRA CODE
}