Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 228599

Summary: For the duplicated parameter native name, its name should be renamed as 'Name_INDEX'
Product: z_Archived Reporter: Mingxia Wu <mwu>
Component: BIRTAssignee: Linda Chan <lchan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: lchan, lchen, qaobsolete, rlu
Version: 2.3.0   
Target Milestone: 2.3.0 RC0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 228611    
Attachments:
Description Flags
Patch none

Description Mingxia Wu CLA 2008-04-24 02:38:19 EDT
For example,the oda response parameter metadata contains serveral parameters:
*  name = "ordernum" and position = 1
*  name = "qty" and position = 2    
*  name = "" and position = 3	(ModelOdaAdapter will assign it a BIRT model name "param_1"
*  name = "qty" and position = 4   (ModelOdaAdapter will assign it an unique BIRT model name)

For the duplicated native name case, the ModelOdaAdapter currently uses the same prefix "param_" to assign an unique name. 
String prefix = StringUtil.isBlank( name ) ? PARAM_PREFIX : name+ RENAME_SEPARATOR;
So in this case, the "qty" in position 4 should be renamed as "qty_4"
Comment 1 Linda Chan CLA 2008-04-24 02:51:59 EDT
Created attachment 97371 [details]
Patch

The attached patch renames a duplicated parameter name with the parameter name as the prefix, followed by the next available sequential number.
For the described use case, "qty" in position 4 is renamed as "qty_1".
Comment 2 Linda Chan CLA 2008-04-24 04:52:13 EDT
Committed patch.