[teiid-issues] [JBoss JIRA] (TEIID-5873) OData mapping issue with mongodb
Steven Hawkins (Jira)
issues at jboss.org
Mon Jul 27 16:51:00 EDT 2020
[ https://issues.redhat.com/browse/TEIID-5873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Hawkins updated TEIID-5873:
----------------------------------
Fix Version/s: (was: 15.0)
Original Estimate: 1 day, 7 hours
Remaining Estimate: 1 day, 7 hours
Story Points: 2
I worked through this on the teiid side in a couple of ways using complex types.
One attempt was to add a complex type as a navigation property - this fails in olingo as there several places that expect to resolve the types to only entities.
Another attempt was to add a complex property directly to the entity. When not specifying the select, it produces behavior similar to https://github.com/OData/WebApi/issues/1887 in that our logic won't know to add the associated join and handling, and thus we end up with a result that has none of the complex type information. Adding more handling along these lines in Teiid is possible, but would be messy - it introduces a separate path for joins and we don't have handling in the select (ODataExpressionToSQLVisitor.visit UriResourceComplexProperty is missing).
Moving out of Teiid 15.
> OData mapping issue with mongodb
> ---------------------------------
>
> Key: TEIID-5873
> URL: https://issues.redhat.com/browse/TEIID-5873
> Project: Teiid
> Issue Type: Enhancement
> Components: Misc. Connectors, OData
> Affects Versions: 13.0.1
> Reporter: Chee Kin Lim
> Assignee: Steven Hawkins
> Priority: Major
> Original Estimate: 1 day, 7 hours
> Remaining Estimate: 1 day, 7 hours
>
> Given the following document in MongoDB matrix_variable collection:
> {
> "_id" : ObjectId("5b2367c9c9e77c0007ca0111"),
> "createdOn" : ISODate("2018-06-15T07:16:25.459Z"),
> "modifiedOn" : ISODate("2018-07-02T02:04:16.661Z"),
> "variableId" : "183cf101d2334ac09bd0db9aee96081f",
> "name" : "lfzq_test",
> "description" : "",
> "lastModifiedUserEmail" : "admin1 at abc.com",
> "headerRow" : {
> "rowId" : "0b002942a5b4424f98fcc270af0290c3",
> "values" : [
> "name",
> "value"
> ],
> "isEncrypted" : [
> false,
> true
> ]
> },
> "rows" : [
> {
> "rowId" : "940467f9bb724d1688086baeec05049b",
> "values" : [
> "lfzq123q",
> "751c634ca5e24102a00800b386955a5c"
> ]
> }
> ],
> "deleted" : false
> }
> The "headerRow" property is exposed as separate entity type in OData schema, but not "rows" property.
> I found the following entity types with odata/$metadata:
> <EntityType Name="headerRow">...</EntityType>
> <EntityType Name="matrix_variable">...</EntityType>
> Github repo to showcase the issue:
> https://github.com/limcheekin/teiid-spring-boot-mongodb-odata
> Related StackOverflow post:
> https://stackoverflow.com/a/59385181/303211
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the teiid-issues
mailing list