When using Record Layer, I was wondering when should a message
be marked as NESTED
?
For example in the following definition for a Record Store,
message MyInnerRecord1 {
option (com.apple.foundationdb.record.record).usage = NESTED;
optional int64 val = 1;
}
message MyInnerRecord2 {
optional int64 val = 1;
}
message MyOuterRecord {
optional int64 pk = 1 [(com.apple.foundationdb.record.field).primary_key = true];
optional MyInnerRecord1 my_inner_record1 = 2;
optional MyInnerRecord2 my_inner_record2 = 3;
}
message UnionDescriptor {
option (com.apple.foundationdb.record.record).usage = UNION;
optional MyOuterRecord _MyOuterRecord = 1;
}
What would be the difference between using MyInnerRecord1
and MyInnerRecord2
?