Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360476 - Default add, get, replace fail for SQL record with column annotations
Summary: Default add, get, replace fail for SQL record with column annotations
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-10 14:01 EDT by Paul Hoffman CLA
Modified: 2017-02-23 14:19 EST (History)
1 user (show)

See Also:


Attachments
Test case for defect (5.04 KB, application/octet-stream)
2011-10-10 14:01 EDT, Paul Hoffman CLA
no flags Details
Library to load database for test case (3.53 KB, application/octet-stream)
2011-10-10 14:01 EDT, Paul Hoffman CLA
no flags Details
test case. (5.06 KB, application/octet-stream)
2011-10-17 14:49 EDT, Paul Hoffman CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.