Van Halbert created TEIID-4318:
----------------------------------
Summary: 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: Feature Request
Components: Misc. Connectors
Affects Versions: 9.x
Reporter: Van Halbert
Assignee: Steven Hawkins
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}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)