[JBoss JIRA] (TEIID-3015) ODATA: Duplicate NavigationProperty name
by Ivan Lucas Vargas (JIRA)
[ https://issues.jboss.org/browse/TEIID-3015?page=com.atlassian.jira.plugin... ]
Ivan Lucas Vargas commented on TEIID-3015:
------------------------------------------
Hi,
I'm having the same problem here. I have a kind of relationship that maps multiple times the same table, but in different fields. Example:
Order.customerId -> Person.id - Generates <NavigationProperty name="Person".../> and should be name="Customer" or, at least, name="Person1"
Order.supplierId -> Person.id - Also generates <NavigationProperty name="Person".../> and should be name="Supplier" or, at least, name="Person2"
Order.carrierId -> Person.id - Also generates <NavigationProperty name="Person".../> and should be name="Carrier" or, at least, name="Person3"
Is there some way to "rename" these relationships?
tks
> ODATA: Duplicate NavigationProperty name
> ----------------------------------------
>
> Key: TEIID-3015
> URL: https://issues.jboss.org/browse/TEIID-3015
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.3
> Reporter: Ramesh Reddy
> Assignee: Ramesh Reddy
> Labels: Beta3
> Fix For: 8.8, 8.7.1
>
>
> Entity 1: TransferRule
> Entity 2: FinancialAccount
> TransferRule
> - sourceAccount : FinancialAccount
> - destination : FinancialAccount
> - other attributes
> the mapping to this for odata resolves to
> <NavigationProperty Name="financialaccount" Relationship="LivingODS.transferrule_destinationfinancial_account_id_fk" FromRole="transferrule" ToRole="financialaccount" />
> <NavigationProperty Name="financialaccount" Relationship="LivingODS.transferrule_sourcefinancial_account_id_fk" FromRole="transferrule"
> ToRole="financialaccount" />
> The navigation property name is duplicated with in transfer rule entity.
> Hence some of the Odata client see it as ambiguous element
> Is there a way to customise the Name to
> Name="src_financialaccount" and
> Name="dest_financialaccount"
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years
[JBoss JIRA] (TEIID-4064) OData - missing non-nullable property
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4064?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4064:
---------------------------------------
I think he's saying that we're putting the null row into the expanded results.
> OData - missing non-nullable property
> -------------------------------------
>
> Key: TEIID-4064
> URL: https://issues.jboss.org/browse/TEIID-4064
> Project: Teiid
> Issue Type: Sub-task
> Components: OData
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
>
> Change DDL for tables Customer and Orders in VDB as follows:
> {code:sql}
> CREATE FOREIGN TABLE Customers (
> id integer PRIMARY KEY OPTIONS (NAMEINSOURCE 'id'),
> name varchar(10)) OPTIONS (NAMEINSOURCE 'DB.PUBLIC.CUSTOMERS');
> CREATE FOREIGN TABLE Orders (
> id integer PRIMARY KEY OPTIONS (NAMEINSOURCE 'id'),
> customerid integer,
> place varchar(10),
> FOREIGN KEY (customerid) REFERENCES Customers(id)) OPTIONS (NAMEINSOURCE 'DB.PUBLIC.ORDERS');
> {code}
> Note, that both tables have same name of primary key named "id".
> Invoke GET method to URL http://localhost:8080/odata4/olingo_basic/Source/Customers/?$count=true&$...
> *Result:* The non-nullable property 'id' is missing.
> Here are selected part of Teiid's log:
> *Query:*
> {code:sql}
> SELECT g10.id, g10.name, g11.id, g11.customerid, g11.place FROM Source.Customers AS g10 LEFT OUTER JOIN Source.Orders AS g11 ON g10.id = g11.customerid ORDER BY g10.id
> {code}
> *Result:*
> |id|name|id|customerid|place|
> |1|customer1|1|1|town|
> |1|customer1|2|1|state|
> |1|customer1|3|1|country|
> |1|customer1|4|1|abroad|
> |2|customer2|5|2|state|
> |2|customer2|6|2|country|
> |3|customer3|7|3|town|
> |3|customer3|8|3|town|
> |4|customer4|<null>|<null>|<null>|
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years
[JBoss JIRA] (TEIID-4064) OData - missing non-nullable property
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4064?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4064:
-------------------------------------
[~shawkins]I do not think I follow this. Are the results wrong or query?
> OData - missing non-nullable property
> -------------------------------------
>
> Key: TEIID-4064
> URL: https://issues.jboss.org/browse/TEIID-4064
> Project: Teiid
> Issue Type: Sub-task
> Components: OData
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
>
> Change DDL for tables Customer and Orders in VDB as follows:
> {code:sql}
> CREATE FOREIGN TABLE Customers (
> id integer PRIMARY KEY OPTIONS (NAMEINSOURCE 'id'),
> name varchar(10)) OPTIONS (NAMEINSOURCE 'DB.PUBLIC.CUSTOMERS');
> CREATE FOREIGN TABLE Orders (
> id integer PRIMARY KEY OPTIONS (NAMEINSOURCE 'id'),
> customerid integer,
> place varchar(10),
> FOREIGN KEY (customerid) REFERENCES Customers(id)) OPTIONS (NAMEINSOURCE 'DB.PUBLIC.ORDERS');
> {code}
> Note, that both tables have same name of primary key named "id".
> Invoke GET method to URL http://localhost:8080/odata4/olingo_basic/Source/Customers/?$count=true&$...
> *Result:* The non-nullable property 'id' is missing.
> Here are selected part of Teiid's log:
> *Query:*
> {code:sql}
> SELECT g10.id, g10.name, g11.id, g11.customerid, g11.place FROM Source.Customers AS g10 LEFT OUTER JOIN Source.Orders AS g11 ON g10.id = g11.customerid ORDER BY g10.id
> {code}
> *Result:*
> |id|name|id|customerid|place|
> |1|customer1|1|1|town|
> |1|customer1|2|1|state|
> |1|customer1|3|1|country|
> |1|customer1|4|1|abroad|
> |2|customer2|5|2|state|
> |2|customer2|6|2|country|
> |3|customer3|7|3|town|
> |3|customer3|8|3|town|
> |4|customer4|<null>|<null>|<null>|
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years
[JBoss JIRA] (TEIID-4062) OData - $crossjoin fails due to missing class
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4062?page=com.atlassian.jira.plugin... ]
Ramesh Reddy updated TEIID-4062:
--------------------------------
Summary: OData - $crossjoin fails due to missing class (was: OData - $corssjoin fails due to missing class)
> OData - $crossjoin fails due to missing class
> ---------------------------------------------
>
> Key: TEIID-4062
> URL: https://issues.jboss.org/browse/TEIID-4062
> Project: Teiid
> Issue Type: Sub-task
> Components: OData
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
>
> *URL:* http://localhost:8080/odata4/olingo_basic/Source/$crossjoin(PutTable,Dele...
> *Missing dependency:* com.fasterxml.jackson
> *Error:*
> {code:plain}
> 11:04:51,047 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/odata4].[odata4]] (http-/127.0.0.1:8080-2) JBWEB000236: Servlet.service() for servlet odata4 threw exception: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.JsonFactory from [Module "org.jboss.teiid.olingo:main" from local module loader @7c53a9eb (finder: local module finder @ed17bee (roots: /home/jdurani/redhat/tests/functional_testing/workdir_olingo/modules,/home/jdurani/redhat/tests/functional_testing/workdir_olingo/modules/system/layers/dv,/home/jdurani/redhat/tests/functional_testing/workdir_olingo/modules/system/layers/base))]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.teiid.olingo.TeiidODataJsonSerializer.complexCollection(TeiidODataJsonSerializer.java:53) [teiid-olingo-8.12.5.redhat-2.jar:8.12.5.redhat-2]
> at org.teiid.olingo.EdmComplexResponse.writeComplexType(EdmComplexResponse.java:73) [teiid-olingo-8.12.5.redhat-2.jar:8.12.5.redhat-2]
> at org.teiid.olingo.service.TeiidServiceHandler.sendResults(TeiidServiceHandler.java:317) [teiid-olingo-8.12.5.redhat-2.jar:8.12.5.redhat-2]
> at org.teiid.olingo.service.TeiidServiceHandler.crossJoin(TeiidServiceHandler.java:834) [teiid-olingo-8.12.5.redhat-2.jar:8.12.5.redhat-2]
> at org.apache.olingo.server.core.requests.DataRequest$CrossJoinRequest.execute(DataRequest.java:692)
> at org.apache.olingo.server.core.requests.DataRequest.execute(DataRequest.java:245)
> at org.apache.olingo.server.core.ServiceDispatcher.execute(ServiceDispatcher.java:117)
> at org.apache.olingo.server.core.OData4HttpHandler.process(OData4HttpHandler.java:65)
> at org.teiid.olingo.web.ODataServlet.service(ODataServlet.java:50) [teiid-olingo-8.12.5.redhat-2.jar:8.12.5.redhat-2]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.teiid.olingo.web.ODataFilter.doFilter(ODataFilter.java:194) [teiid-olingo-8.12.5.redhat-2.jar:8.12.5.redhat-2]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years
[JBoss JIRA] (TEIID-4062) OData - $corssjoin fails due to missing class
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4062?page=com.atlassian.jira.plugin... ]
Work on TEIID-4062 started by Ramesh Reddy.
-------------------------------------------
> OData - $corssjoin fails due to missing class
> ---------------------------------------------
>
> Key: TEIID-4062
> URL: https://issues.jboss.org/browse/TEIID-4062
> Project: Teiid
> Issue Type: Sub-task
> Components: OData
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
>
> *URL:* http://localhost:8080/odata4/olingo_basic/Source/$crossjoin(PutTable,Dele...
> *Missing dependency:* com.fasterxml.jackson
> *Error:*
> {code:plain}
> 11:04:51,047 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/odata4].[odata4]] (http-/127.0.0.1:8080-2) JBWEB000236: Servlet.service() for servlet odata4 threw exception: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.JsonFactory from [Module "org.jboss.teiid.olingo:main" from local module loader @7c53a9eb (finder: local module finder @ed17bee (roots: /home/jdurani/redhat/tests/functional_testing/workdir_olingo/modules,/home/jdurani/redhat/tests/functional_testing/workdir_olingo/modules/system/layers/dv,/home/jdurani/redhat/tests/functional_testing/workdir_olingo/modules/system/layers/base))]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.teiid.olingo.TeiidODataJsonSerializer.complexCollection(TeiidODataJsonSerializer.java:53) [teiid-olingo-8.12.5.redhat-2.jar:8.12.5.redhat-2]
> at org.teiid.olingo.EdmComplexResponse.writeComplexType(EdmComplexResponse.java:73) [teiid-olingo-8.12.5.redhat-2.jar:8.12.5.redhat-2]
> at org.teiid.olingo.service.TeiidServiceHandler.sendResults(TeiidServiceHandler.java:317) [teiid-olingo-8.12.5.redhat-2.jar:8.12.5.redhat-2]
> at org.teiid.olingo.service.TeiidServiceHandler.crossJoin(TeiidServiceHandler.java:834) [teiid-olingo-8.12.5.redhat-2.jar:8.12.5.redhat-2]
> at org.apache.olingo.server.core.requests.DataRequest$CrossJoinRequest.execute(DataRequest.java:692)
> at org.apache.olingo.server.core.requests.DataRequest.execute(DataRequest.java:245)
> at org.apache.olingo.server.core.ServiceDispatcher.execute(ServiceDispatcher.java:117)
> at org.apache.olingo.server.core.OData4HttpHandler.process(OData4HttpHandler.java:65)
> at org.teiid.olingo.web.ODataServlet.service(ODataServlet.java:50) [teiid-olingo-8.12.5.redhat-2.jar:8.12.5.redhat-2]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.teiid.olingo.web.ODataFilter.doFilter(ODataFilter.java:194) [teiid-olingo-8.12.5.redhat-2.jar:8.12.5.redhat-2]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years
[JBoss JIRA] (TEIID-4057) OData - if PUT fails, next update request fails because table in DB is still locked
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4057?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4057.
-----------------------------------
Fix Version/s: 9.0
8.12.5
Resolution: Done
Ensuring that rollback is always called and that any validation errors will occur before calling to delete.
> OData - if PUT fails, next update request fails because table in DB is still locked
> -----------------------------------------------------------------------------------
>
> Key: TEIID-4057
> URL: https://issues.jboss.org/browse/TEIID-4057
> Project: Teiid
> Issue Type: Sub-task
> Components: OData
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5
>
>
> I can see (from the log) that processing of PUT request is as follows:
> # select record from table
> # delete record
> # parse entity from HTTP request
> # insert new record
> But if e.g. step 3 fails, Teiid cancels transaction and returns error. In my opinion, parsing of the entity should be the first step (or at least right after select).
> What happen here is, that DELETE statement creates transaction and locks the table. But the transaction is not canceled immediately after cancel request \[1\]. This causes that no other query can succeed, because of lock on the table (EAP uses connection pool and does not close connections immediately and therefore open connection has still one transaction in active state).
> *Note:* We use H2 database for testing purpose. But I think that this could happen with any DB. Anyway, parsing of the entity should not be performed after delete.
> \[1\]
> {code:plain}
> 09:35:33,937 DEBUG [org.teiid.TRANSPORT] (New I/O worker #1) Channel closed
> 09:40:31,430 WARN [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA012117: TransactionReaper::check timeout for TX 0:ffff7f000001:113c3cbe:56e131a7:e in state RUN
> 09:40:31,438 WARN [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA012121: TransactionReaper::doCancellations worker Thread[Transaction Reaper Worker 0,5,main] successfully canceled TX 0:ffff7f000001:113c3cbe:56e131a7:e
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years