]
Van Halbert closed TEIID-4318.
------------------------------
Resolution: Duplicate Issue
This is being resolved in TEIID-4456 and the improvement of handling nested and non-nested
protobuf messages.
Add option to define or determine ProtoField 1-to-x relationships
-----------------------------------------------------------------
Key: TEIID-4318
URL:
https://issues.jboss.org/browse/TEIID-4318
Project: Teiid
Issue Type: Enhancement
Components: Misc. Connectors
Affects Versions: 9.x
Reporter: Van Halbert
Assignee: Van Halbert
Now that the infinispan hotrod translator/connector support the use of Java Protobuf
Annotations for defining the metadata and configuring the cache, now the logic needs to be
able to determine the 1-to-n relationships that can be defined from the parent object.
Example: a Person can have 0 to many phone numbers
The following is how to define with annotation:
{code}
Person {
...
@ProtoField(number = 4, collectionImplementation = ArrayList.class)
public List<PhoneNumber> phones;
...
}
{code}
The connector will need to be able to make this determination so that it can register
PhoneNumber when configuring the cache. Example:
{code}
String protoSchema = protoSchemaBuilder
.fileName(protoName)
.addClass(Person.class)
.addClass(PhoneNumber.class)
.build(ctx);
{code}