[ 
https://issues.apache.org/jira/browse/TUSCANY-1464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Amita Vadhavkar updated TUSCANY-1464:
-------------------------------------

    Attachment: 1464.patch

http://www.mail-archive.com/[email protected]/msg20852.html
Please see the above thread for discussion and below are the change details:-
1)rdb/pom.xml
Entires to generate static SDO classes for new companynoid.xsd

2)rdb/src/main/java/org/apache/tuscany/das/rdb/graphbuilder/impl/ResultMetadata.java
New method fillTableToPrimaryKeysMap() called in constructor to fill map of 
TypeName -> PropertyNames for all PK properties

New Helper getAllPKsForTable(tableTypeName)

3)rdb/src/main/java/org/apache/tuscany/das/rdb/graphbuilder/impl/ResultSetProcessor.java
In addRowToGraph() - 
When any table in SELECT misses PK , throw runtime exception
Do not allow null objects in registry and tableObjects

4)rdb/src/main/java/org/apache/tuscany/das/rdb/graphbuilder/impl/ResultSetRow.java
New method - Collection getAllTableNamesForRS() - to return all tableTypeNames 
for a result set

New method - void checkResultSetMissesPK() - detect if the result set misses 
PKs and set flag to
FALSE in tableData for it.

5)rdb/src/main/java/org/apache/tuscany/das/rdb/graphbuilder/impl/TableData.java
New method - void setValidPrimaryKey(boolean) - to set flag

Removed - hasValidPrimaryKey = false; from addData() - as with new logic this 
is not needed and 
will otherwise make RecursiveTests fail

6)rdb/src/test/java/org/apache/tuscany/das/rdb/test/AliasTests.java
Minor correction in SetUp() - CustomerData() was missing

7)rdb/src/test/java/org/apache/tuscany/das/rdb/test/commands/ReadCustomersStaticTypesCommand.java
Correction to register static Types

8)rdb/src/test/java/org/apache/tuscany/das/rdb/test/CompanyTests.java
With this new fix, this test class will not pass when SQL misses PKs, so added 
to it 
and modified company.xsd, companyMapping.xml, companyMappingWithConverter.xml

9)rdb/src/test/java/org/apache/tuscany/das/rdb/test/ConverterTests.java
Minor correction in setup() - OrderData() was missing

10)rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/DepartmentData.java
Modified for COMPANY-DEPARTMENT relation data to be not null. Else, 
GeneratedId.TestFlushCreateHierarchy() will fail with new changes

11)rdb/src/test/java/org/apache/tuscany/das/rdb/test/DefectTests.java
testReadUpdateWithNoPKColumns() - commented as this is now not possible with 
new code change

corrected testDiltonsInsert()

12)rdb/src/test/java/org/apache/tuscany/das/rdb/test/ExceptionTests.java
changed to use new CompanynoidFactory (companynoid.xsd) and related xmls

13)rdb/src/test/resources/company.xsd
added ID attributes

(new)14)rdb/src/test/resources/companynoid.xsd
similar to company.xsd but without id attributes

(new)15)rdb/src/test/resources/companynoidMappingWithConverters.xml
xml for 15)

(new)16)rdb/src/test/java/org/apache/tuscany/das/rdb/test/MissingPKTests.java
New Unit Tests

(new)17)rdb/src/test/resources/MissingPKREL.xml
for 16)

(new)18)rdb/src/test/resources/MissingPK.xml
for 16)

19)rdb/src/test/java/org/apache/tuscany/das/rdb/test/suites/AllCommonTests.java
Added MissingPKTests

> Wrong query results when SELECT misses PKs
> ------------------------------------------
>
>                 Key: TUSCANY-1464
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1464
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java DAS RDB
>    Affects Versions: Java-DAS-Next
>            Reporter: Amita Vadhavkar
>            Assignee: Amita Vadhavkar
>             Fix For: Java-DAS-Next
>
>         Attachments: 1464.patch
>
>
> http://www.mail-archive.com/[email protected]/msg20322.html
> Fix the bug uncovered in above mail discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to