soa - DB adapter receives duplicate rows from DB2 table -
it 11g version..
a db adapter has been created operation type perform select operation on db2 table/view. db2 table/view not have primary key column defined in database. have step in db adapter configuration wizard required select primary key column of table/view (if primary key defined, selected default). let db2 view has data below.
a|b |c
1|x1|2.2
1|y1|4.6
1|z1|4.6
1|x1|3.3
1|z1|(null)
the primary key column selected 'b' proceed next step there isn't column unique values. when business service of case executed in osb console response received duplicate rows below.
<collection><br/> <row><br/> <a>1</a><br/> <b>x1</b><br/> <c>2.2</c><br/> </row><br/> <row><br/> <a>1</a><br/> <b>y1</b><br/> <c>4.6</c><br/> </row><br/> <row><br/> <a>1</a><br/> <b>z1</b><br/> <c>4.6</c><br/> </row><br/> <row><br/> <a>1</a><br/> <b>x1</b><br/> <c>2.2</c><br/> </row><br/> <row><br/> <a>1</a><br/> <b>z1</b><br/> <c>4.6</c><br/> </row><br/> </collection>
as seen response xml clear same data present in table not fetched exactly. (i.e.) if there 2 rows value of b x1 different values of & c, response has 2 rows value of a,b & c of first row (as shown values of c in above xml x1 , z1)
there way select multiple columns create composite primary key 3 columns cannot selected primary key column c have data can (null) throw error primary key column cannot have null values.
only columns , b can selected composite primary key response xml have 5 records in xml data of first row in 5 records value of same rows.
hope able explain problem make understand. please comment in thoughts , ideas if have ever faced same or similar issue.
thanks in advance
Comments
Post a Comment