[
https://issues.jboss.org/browse/TEIID-4590?page=com.atlassian.jira.plugin...
]
Van Halbert updated TEIID-4590:
-------------------------------
Comment: was deleted
(was: The issue is not fixed properly. I have two POJOs, two resource-adapters configured,
single JDG instance and cache is used.
Tested usecase:
{code:sql}
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(1,'1',true);
SELECT * FROM jdgSource1.SmallA;
INSERT INTO jdgSource2.CustomerReport(customerId,totalAmount) VALUES(1,1);
SELECT * FROM jdgSource2.CustomerReport;
SELECT * FROM jdgSource1.SmallA;
{code}
Everything works as expected but the last query. It returns empty resultset, but there
should be single row. (Second query returned correctly 1 row)
The issue seems to be that last INSERT somehow erases the previous contents.
When you try:
{code:sql}
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(1,'1',true);
INSERT INTO jdgSource2.CustomerReport(customerId,totalAmount) VALUES(1,1);
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(2,'2',false);
SELECT * FROM jdgSource1.SmallA;
{code}
you get only one row by the fourth query.
The reason is:
You have two POJOs, both have an id specified (different column names). When there is
common Id value for different POJOs, in previous example it is value 1 for both
'intKey' and 'customerId', the object in jdg cache get overwritten. It is
due to the fact, that objects in JDG are being stored in key-value way.
This is undesirable behaviour, because an object of one POJO class is overwritten by an
object of different POJO class. This is blocking issue.
Note: if the id is unique across all POJOs inserted into single cache, this problem
doesn't occur:
{code:sql}
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(1,'1',true);
INSERT INTO jdgSource2.CustomerReport(customerId,totalAmount) VALUES(3,3);
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(2,'2',false);
SELECT * FROM jdgSource1.SmallA;
{code}
in this case, correct values are being returned.
)
Fix the Select ALL logic so that it works when different object types
exists
----------------------------------------------------------------------------
Key: TEIID-4590
URL:
https://issues.jboss.org/browse/TEIID-4590
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 9.2
Reporter: Van Halbert
Assignee: Van Halbert
Priority: Blocker
Fix For: 9.2, 8.12.8.6_3
Fix the select * (ALL) logic so that it can work when there are multiple object types in
the cache. The select ALL should only be selecting based on the object type associated
with that table.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)