Take the example from the documentation, using ToMany relations:
@Entity
public class Customer {
@Id public long id;
// 'to' is optional if only one relation matches.
@Backlink(to = "customer")
public ToMany<Order> orders;
}
@Entity
public class Order {
@Id public long id;
String stringId;
...
}
where stringId in order is a long string like "CS-DE-AA-order1234567890".
For the same purpose, if I keep a list of string ids and manage them myself, it would be like:
@Entity
public class Customer {
@Id public long id;
String orderIds;
}
where orderIds keeps Orders' stringId separated by space, like: "CS-DE-AA-order1234567891 CD-DF-AB-order1234567891 CT-SE-BB-order1234567892 ..."
So I would like to know how the two schemes compare in terms of performance, efficiency and disk storage.