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

Bug 363382

Summary: SQL - red tag on CNTL-1 default statements for records with more than one key
Product: z_Archived Reporter: Paul Hoffman <hoffmanp>
Component: EDTAssignee: Zhi Zhu <zhuzhi>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: chenzhh
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Paul Hoffman CLA 2011-11-09 15:48:05 EST
If a record or entity as more than one field with the @ID annotation, CNTL-1 put parentheses around the list of fields.   The parentheses should not be there and get a red tag.

Here is an example of a statement created for delete mypayment from ds :


get myPayment from ds  using(myPayment.Payment_ID, myPayment.category) with
	   	#sql{
	   		select
	   			Payment_ID, category, rtrim(description), Amount, 
	   			Due_Date
	   		from Payment
	   		where
	   			Payment_ID = ?
	   				and category = ?
	   	};

Generated statement should be:

get myPayment from ds  using myPayment.Payment_ID, myPayment.category  with
	   	#sql{
	   		select
	   			Payment_ID, category, rtrim(description), Amount, 
	   			Due_Date
	   		from Payment
	   		where
	   			Payment_ID = ?
	   				and category = ?
	   	};
Comment 1 Zhi Zhu CLA 2011-11-09 21:33:10 EST
use 'Space' as separator, not using right/left parenthesis any more
Comment 2 Paul Hoffman CLA 2011-11-14 08:43:41 EST
Verified and closed