Is it possible to point a relation to different classes?

For example, I have two classes: log_device_type_a and log_device_type_b

And i also have general devices class. In this class I have rows with the “log” relation column. Is it possible to point it to items from log_device_type_a for some rows, and to items from log_device_type_b, for others?

Pointing a relation to different classes is currently unsupported. But a couple of alternatives come to my mind:

  1. Use an Array of Pointers instead of a Relation.
  2. Emulate the behavior of the Relation by creating a new class, for example, “DevicesLogRelation”; and adding 3 columns: “deviceId”, “logId” and “logClass”… then proceed from there.

I’ve used the crudest (no puns here) and easiest approach, lol: just added two fields. One points to related devices of type a, another to type b. Maybe not the cleanest or smartest solution, but it works.