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

Bug 360476

Summary: Default add, get, replace fail for SQL record with column annotations
Product: z_Archived Reporter: Paul Hoffman <hoffmanp>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jvincens
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
test case. none

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

First of all the default SQL statement displayed when you hit cntl-1 for add and replace is incorrect.

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 }.

Once these issues are corrected please run sample test and correct any exceptions.

See sample test program below.
Comment 1 Paul Hoffman CLA 2011-10-10 14:01:54 EDT
Created attachment 204898 [details]
Library to load database for test case
Comment 2 Joseph Vincens CLA 2011-10-14 12:00:33 EDT
fixed
Comment 3 Paul Hoffman CLA 2011-10-17 14:48:28 EDT
Reopened.   Testcase reattached.

Initial add throws following exception:


add row
Failure:  Exception = Syntax error: Encountered "?" at line 1, column 5.: [sqlstate:42X01][sqlcode:30,000]
Comment 4 Paul Hoffman CLA 2011-10-17 14:49:32 EDT
Created attachment 205365 [details]
test case.
Comment 5 Paul Hoffman CLA 2011-10-17 15:22:23 EDT
Error message in last commend came from another statement.   Test case error.
Comment 6 Paul Hoffman CLA 2011-10-24 10:01:42 EDT
Closed and verified with altered test case.