[JBoss JIRA] (TEIID-5159) Quickstart hibernate-on-top-of-teiid usability issues
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-5159?page=com.atlassian.jira.plugin... ]
Van Halbert resolved TEIID-5159.
--------------------------------
Resolution: Done
> Quickstart hibernate-on-top-of-teiid usability issues
> -----------------------------------------------------
>
> Key: TEIID-5159
> URL: https://issues.jboss.org/browse/TEIID-5159
> Project: Teiid
> Issue Type: Bug
> Components: Quick Starts
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Fix For: 8.12.x-6.4, 10.x
>
>
> There are two usability issues:
> 1. we're reusing Portfolio vdb. The thing is, that if user performed also dynamicvdb-dataroles quickstart, the Portfolio vdb will have limitations on data access. So it is crucial, for the functionality of hibernate qs for user to provide correct credentials. It has to be credentials allowing read access for the example query in the end.
> 2. mvn package is enough, no need for mvn install when building WAR file
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-5159) Quickstart hibernate-on-top-of-teiid usability issues
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-5159?page=com.atlassian.jira.plugin... ]
Van Halbert updated TEIID-5159:
-------------------------------
Fix Version/s: 10.x
> Quickstart hibernate-on-top-of-teiid usability issues
> -----------------------------------------------------
>
> Key: TEIID-5159
> URL: https://issues.jboss.org/browse/TEIID-5159
> Project: Teiid
> Issue Type: Bug
> Components: Quick Starts
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Fix For: 8.12.x-6.4, 10.x
>
>
> There are two usability issues:
> 1. we're reusing Portfolio vdb. The thing is, that if user performed also dynamicvdb-dataroles quickstart, the Portfolio vdb will have limitations on data access. So it is crucial, for the functionality of hibernate qs for user to provide correct credentials. It has to be credentials allowing read access for the example query in the end.
> 2. mvn package is enough, no need for mvn install when building WAR file
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-5159) Quickstart hibernate-on-top-of-teiid usability issues
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-5159?page=com.atlassian.jira.plugin... ]
Van Halbert updated TEIID-5159:
-------------------------------
Fix Version/s: 8.12.x-6.4
> Quickstart hibernate-on-top-of-teiid usability issues
> -----------------------------------------------------
>
> Key: TEIID-5159
> URL: https://issues.jboss.org/browse/TEIID-5159
> Project: Teiid
> Issue Type: Bug
> Components: Quick Starts
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Fix For: 8.12.x-6.4
>
>
> There are two usability issues:
> 1. we're reusing Portfolio vdb. The thing is, that if user performed also dynamicvdb-dataroles quickstart, the Portfolio vdb will have limitations on data access. So it is crucial, for the functionality of hibernate qs for user to provide correct credentials. It has to be credentials allowing read access for the example query in the end.
> 2. mvn package is enough, no need for mvn install when building WAR file
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-4397) Allow $it to be used in expand
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4397?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4397:
---------------------------------------
> What are the semantics for using $it?
See http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-ur... section 5.1.1.11.4
{quote}
Example 84: customers along with their orders that shipped to the same city as the customer's address. The nested filter expression is evaluated in the context of Orders; $it allows referring to values in the outer context of Customers.
http://host/service/Customers?
$expand=Orders($filter=$it/Address/City eq ShipTo/City)
{quote}
> Is this what is expected?
I don't think so. It should apply to the expanded entity, not the parent. I know there were several issues with self relationships and predicates. I'll double check this behavior in the upstream.
> Either way I wasn't able to find this in docs. Generally speaking the docs on OData topic are not very helpful as far as supported functionality is concerned.
For the most part we rely on users consulting the spec -http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html Any deviation from that or unsupported features should be documented.
> Second question, is this applicable to $expand=* usage?
You would generally use expand * when there is more than one navigation property so that everything can be expanded.
> Allow $it to be used in expand
> ------------------------------
>
> Key: TEIID-4397
> URL: https://issues.jboss.org/browse/TEIID-4397
> Project: Teiid
> Issue Type: Sub-task
> Components: OData
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.1, 8.12.x-6.4
>
>
> It should be possible to use $it in expand for correlated references.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-4269) numeric calculated fields not displayed with odata4
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-4269?page=com.atlassian.jira.plugin... ]
Jan Stastny commented on TEIID-4269:
------------------------------------
[~shawkins] But the TestOdataIntegration#testDecimalPrecisionScale test method tests even for the failing usecase. Does it fail then?
> numeric calculated fields not displayed with odata4
> ---------------------------------------------------
>
> Key: TEIID-4269
> URL: https://issues.jboss.org/browse/TEIID-4269
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.12
> Reporter: Mirco Marchitiello
> Assignee: Ramesh Reddy
> Fix For: 9.1, 8.12.x-6.4
>
>
> I've created a virtual table with a new field defined in this way:
> select ROUND((BA.PREIS / BA.PEINH), 3) AS UnitPrice from xxxxxx
> for the source field are bigdecimal I define UnitPrice as
> BigDecimal (13,3)
> If I run the qery from JDBC
> select * from PurchaseRequisitionEntity where PurchaseRequisitionKey = '300-8000001452-00010' ;
> PREIS = 539,568
> PEINH = 106
> UnitPrice = 5,090.264
> And the result is correct. If I run from odata2
> /odata/CASALE.1/Entities.PurchaseRequisitionEntity('300-8000001452-00010')?$format=json
> "UnitPrice" : "5090.2640000000000000"
> As you can see the field is rounded to the 3rd digit but 13 more digits are returned with 0 value.
> Anyway odata2 succeeds in returning the result without errors.
> With odata4 I get an error:
> /odata4/CASALE.1/Entities/PurchaseRequisitionEntity('300-8000001452-00010')?$format=json
> {"error":{"code":null,"message":"The value '5090.2640000000000000' is not valid for property 'UnitPrice'."}}
> I think that's because the length of the field is greater then the matedata definition.
> At the moment the only solution I can imagine is to convert the number to a string in the proper format and the parse it into a number
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-4269) numeric calculated fields not displayed with odata4
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4269?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4269:
---------------------------------------
[~jstastny] TEIID-5063 limited the scope of these changes to just trim trailing zeros (which are considered non-significant in sql for comparison purposes) - otherwise there will be issues with searching. This also satisfies this issue as logged, but as you are seeing will fail for situations where the calculation doesn't fully match the expectations. We can add a doc note about using round or perhaps it would be better to include a different exception message indicating round should be used.
> numeric calculated fields not displayed with odata4
> ---------------------------------------------------
>
> Key: TEIID-4269
> URL: https://issues.jboss.org/browse/TEIID-4269
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.12
> Reporter: Mirco Marchitiello
> Assignee: Ramesh Reddy
> Fix For: 9.1, 8.12.x-6.4
>
>
> I've created a virtual table with a new field defined in this way:
> select ROUND((BA.PREIS / BA.PEINH), 3) AS UnitPrice from xxxxxx
> for the source field are bigdecimal I define UnitPrice as
> BigDecimal (13,3)
> If I run the qery from JDBC
> select * from PurchaseRequisitionEntity where PurchaseRequisitionKey = '300-8000001452-00010' ;
> PREIS = 539,568
> PEINH = 106
> UnitPrice = 5,090.264
> And the result is correct. If I run from odata2
> /odata/CASALE.1/Entities.PurchaseRequisitionEntity('300-8000001452-00010')?$format=json
> "UnitPrice" : "5090.2640000000000000"
> As you can see the field is rounded to the 3rd digit but 13 more digits are returned with 0 value.
> Anyway odata2 succeeds in returning the result without errors.
> With odata4 I get an error:
> /odata4/CASALE.1/Entities/PurchaseRequisitionEntity('300-8000001452-00010')?$format=json
> {"error":{"code":null,"message":"The value '5090.2640000000000000' is not valid for property 'UnitPrice'."}}
> I think that's because the length of the field is greater then the matedata definition.
> At the moment the only solution I can imagine is to convert the number to a string in the proper format and the parse it into a number
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-4397) Allow $it to be used in expand
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-4397?page=com.atlassian.jira.plugin... ]
Jan Stastny edited comment on TEIID-4397 at 11/24/17 4:07 PM:
--------------------------------------------------------------
[~shawkins] What are the semantics for using $it?
Following example:
* Employee (employee_id, name, manager_id) is a entity with self-relation.
* I have
| employee_id | name | manager_id |
| 1 | 'president'| null |
| 2 | 'vice-president'| 1 |
| 3 | 'director'| 2 |
| 4 | 'manager1'| 3 |
| 5 | 'manager2'| 3 |
| 6 | 'employee1'| 4 |
| 7 | 'employee2'| 4 |
| 8 | 'employee3'| 4 |
| 9 | 'employee4'| 5 |
| 10 | 'employee5'| 5 |
| 11 | 'employee6'| 5 |
* now for query
{code}http://localhost:8080/odata4/olingo_basic/Source/Employee?$expand=Employee_FK0($filter=$it/name%20eq%20%27president%27){code}
* the result is that only Employee 'president' is expanded
* Is this what is expected?
Either way I wasn't able to find this in docs. Generally speaking the docs on OData topic are not very helpful as far as supported functionality is concerned.
Second question, is this applicable to $expand=* usage?
was (Author: jstastny):
[~shawkins] What are the semantics for using $it?
Following example:
* Employee (employee_id, name, manager_id) is a entity with self-relation.
* I have
| employee_id | name | manager_id |
| 1 | 'president'| null |
| 2 | 'vice-president'| 1 |
| 3 | 'director'| 2 |
| 4 | 'manager1'| 3 |
| 5 | 'manager2'| 3 |
| 6 | 'employee1'| 4 |
| 7 | 'employee2'| 4 |
| 8 | 'employee3'| 4 |
| 9 | 'employee4'| 5 |
| 10 | 'employee5'| 5 |
| 11 | 'employee6'| 5 |
* now for query
{code}http://localhost:8080/odata4/olingo_basic/Source/Employee?$expand=Employee_FK0($filter=$it/name%20eq%20%27president%27){code}
* the result is that only Employee 'president' is expanded
* Is this what is expected?
Either way I wasn't able to find this in docs. Generally speaking the docs on OData topic are not very helpful as far as supported functionality is concerned.
> Allow $it to be used in expand
> ------------------------------
>
> Key: TEIID-4397
> URL: https://issues.jboss.org/browse/TEIID-4397
> Project: Teiid
> Issue Type: Sub-task
> Components: OData
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.1, 8.12.x-6.4
>
>
> It should be possible to use $it in expand for correlated references.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-4397) Allow $it to be used in expand
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-4397?page=com.atlassian.jira.plugin... ]
Jan Stastny commented on TEIID-4397:
------------------------------------
[~shawkins] What are the semantics for using $it?
Following example:
* Employee (employee_id, name, manager_id) is a entity with self-relation.
* I have
| employee_id | name | manager_id |
| 1 | 'president'| null |
| 2 | 'vice-president'| 1 |
| 3 | 'director'| 2 |
| 4 | 'manager1'| 3 |
| 5 | 'manager2'| 3 |
| 6 | 'employee1'| 4 |
| 7 | 'employee2'| 4 |
| 8 | 'employee3'| 4 |
| 9 | 'employee4'| 5 |
| 10 | 'employee5'| 5 |
| 11 | 'employee6'| 5 |
* now for query
{code}http://localhost:8080/odata4/olingo_basic/Source/Employee?$expand=Employee_FK0($filter=$it/name%20eq%20%27president%27){code}
* the result is that only Employee 'president' is expanded
* Is this what is expected?
Either way I wasn't able to find this in docs. Generally speaking the docs on OData topic are not very helpful as far as supported functionality is concerned.
> Allow $it to be used in expand
> ------------------------------
>
> Key: TEIID-4397
> URL: https://issues.jboss.org/browse/TEIID-4397
> Project: Teiid
> Issue Type: Sub-task
> Components: OData
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.1, 8.12.x-6.4
>
>
> It should be possible to use $it in expand for correlated references.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-4269) numeric calculated fields not displayed with odata4
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-4269?page=com.atlassian.jira.plugin... ]
Jan Stastny commented on TEIID-4269:
------------------------------------
This doesn't seem to be resolved in 8.12.x-6.4.
I am getting HTTP code 400 and error message:
{code}
{"error":{"code":null,"message":"The value '12.31' is not valid for property 'decimalval'."}}
{code}
The tested scenario is just copied integration test from the commit.
> numeric calculated fields not displayed with odata4
> ---------------------------------------------------
>
> Key: TEIID-4269
> URL: https://issues.jboss.org/browse/TEIID-4269
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.12
> Reporter: Mirco Marchitiello
> Assignee: Ramesh Reddy
> Fix For: 9.1, 8.12.x-6.4
>
>
> I've created a virtual table with a new field defined in this way:
> select ROUND((BA.PREIS / BA.PEINH), 3) AS UnitPrice from xxxxxx
> for the source field are bigdecimal I define UnitPrice as
> BigDecimal (13,3)
> If I run the qery from JDBC
> select * from PurchaseRequisitionEntity where PurchaseRequisitionKey = '300-8000001452-00010' ;
> PREIS = 539,568
> PEINH = 106
> UnitPrice = 5,090.264
> And the result is correct. If I run from odata2
> /odata/CASALE.1/Entities.PurchaseRequisitionEntity('300-8000001452-00010')?$format=json
> "UnitPrice" : "5090.2640000000000000"
> As you can see the field is rounded to the 3rd digit but 13 more digits are returned with 0 value.
> Anyway odata2 succeeds in returning the result without errors.
> With odata4 I get an error:
> /odata4/CASALE.1/Entities/PurchaseRequisitionEntity('300-8000001452-00010')?$format=json
> {"error":{"code":null,"message":"The value '5090.2640000000000000' is not valid for property 'UnitPrice'."}}
> I think that's because the length of the field is greater then the matedata definition.
> At the moment the only solution I can imagine is to convert the number to a string in the proper format and the parse it into a number
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month