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

Bug 360477

Summary: CNTL-1 shows incorrect SQL for add, replace when column annotations are specified.
Product: z_Archived Reporter: Paul Hoffman <hoffmanp>
Component: EDTAssignee: Zhi Zhu <zhuzhi>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: chenzhh
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Test case for defect
none
Library to load database for test case none

Description Paul Hoffman CLA 2011-10-10 14:29:01 EDT
Created attachment 204899 [details]
Test case for defect

The default SQL statement displayed when you hit cntl-1 for add
and replace is incorrect when annotations are specified for the columns in the record.

The default insert statement generated for an add should omit all columns with
the annotations @GeneratedValue or @Column { insertable=false }.

The "for update of" clause in the update statement generated for a replace
statement should omit all columns the annotation @Column { updateable=false }.

To see example, use attached test program and press CNTL1 for the add statement in function addRow and the replace statement n the function replaceRow.
Comment 1 Paul Hoffman CLA 2011-10-10 14:29:23 EDT
Created attachment 204900 [details]
Library to load database for test case
Comment 2 Zhi Zhu CLA 2011-10-13 02:01:27 EDT
fix it(SQLUtility)
Comment 3 Paul Hoffman CLA 2011-10-24 10:04:39 EDT
Verified and closed.