[teiid-issues] [JBoss JIRA] (TEIID-4456) Enable the abiltiy to support nested and non-nested message descriptors

Van Halbert (JIRA) issues at jboss.org
Tue Oct 11 08:04:00 EDT 2016


    [ https://issues.jboss.org/browse/TEIID-4456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13305450#comment-13305450 ] 

Van Halbert commented on TEIID-4456:
------------------------------------

NOTE:  this fix doesn't change how the pojo's are exposed as tables, only how the metadata is derived from the descriptor.

The resource-adapter configuration  cacheTypeMap indicates the root class for which all relationships will be aligned.

Using the MessageDescriptor property (bigdata.DataEntity), it gives the root descriptor location in the protobuf  descriptor file for which will be the 1st (primary) table created.   Then reading the details of the root descriptor, can determine what other relationships or column attribute that will be created.  In this case, there's a complex object (e., MetatData) that represents a 1-to-1 relationship.   So the logic has to derive the message descriptor for that object.  The initial logic was expecting the message descriptor to be defined within the current (parent) descriptor.   The change will now look for the descriptor outside (non-nested) of the parent descriptor.  


To test this, move the descriptor for Metadata from being defined within the parent to be at the top level.       Why this is important is because for an existing JDG instance, the MetaData message descriptor could be shared among several other messages defined in the same .proto file.   

> Enable the abiltiy to support nested and non-nested message descriptors
> -----------------------------------------------------------------------
>
>                 Key: TEIID-4456
>                 URL: https://issues.jboss.org/browse/TEIID-4456
>             Project: Teiid
>          Issue Type: Enhancement
>          Components: Misc. Connectors
>            Reporter: Van Halbert
>            Assignee: Van Halbert
>             Fix For: 9.1
>
>
> Protobuf definition files can have messages defined in a nested and non-nested form. 
> Nested:
> {code}
> package bigdata;
> message DataEntity {
> ..
>    optional MetaData context = 6;
>   message MetaData {
>  ... 
>  }
> }
> {code}
> Non-nested:
> {code}
> package bigdata;
> message DataEntity {
> ..
>    optional MetaData context = 6;
> }
>   message MetaData {
>  ... 
>  }
> {code}
> The ProtobufMetadataProcessor needs to be changed to so that it can create the metadata from either use case.  
> Currently it obtains the child descriptor messages from the parent descriptor. 



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the teiid-issues mailing list