Source: ZettaScale Technology ( Erik Hendriks)
In section 7.6.8 it is stated that for a nested struct that is annotated as key for an embedding struct, you have to follow the following process to to generate its KeyHolder: "If there are any key members, then remove the non-key members from FooKeyHolder. Otherwise do not remove any members."
So what if the struct has no explicit key members, but it has explicitly mentioned that a certain field should not act as key? Take for example the following example:
There are three different ways to interpret the rules for this usecase:
- Both x and y will end up in the KeyHolder, since Foo did not specify any key members, so nothing gets removed.
- Only y will end up in the KeyHolder, since Foo specified explicitly that x should not act as key.
- Neither x nor y will end up in the KeyHolder, since some of the members have an explicit key annotation and so I remove all the members which are not keys, which is y (stated explicitly) and x (stated implicitly).
So the big underlying question is: is explicitly stating @key(false) equal to not having a @key annotation at all, or does explicitly stating that a member is not a key have some more expressive power over implicitly determining its key status by absence of the @key annotation?
Reported: DDS-XTypes 1.3b1 — Wed, 27 Jan 2021 15:03 GMT
Updated: Fri, 5 Feb 2021 16:25 GMT