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

Bug 321108

Summary: [DB] Name starting with underscore is not handled
Product: [Modeling] EMF Reporter: Egidijus Vaisnora <vaisegid>
Component: cdo.dbAssignee: Stefan Winkler <stefan>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: saulius.tvarijonas, stepper
Version: 4.0Flags: stepper: review+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Testcase+Patch-v1
none
Patch v2 - ready to be committed none

Description Egidijus Vaisnora CLA 2010-07-28 07:18:28 EDT
Create EAttribute with a name starting with underscore in ECore model. 
 Tables creation fails under Derby DB, because first symbol in column name cannot be other than letter.
Comment 1 Egidijus Vaisnora CLA 2010-08-05 08:50:56 EDT
Stefan, could you take a look at this? This issue is very important to us
Comment 2 Stefan Winkler CLA 2010-08-05 13:27:52 EDT
Created attachment 175965 [details]
Testcase+Patch-v1

Ok, because you asked so nicely. Here you are.
This implementation prepends an X if an underscore is the first character in a table or column name with Derby. 
Note that you can always influence table/column names through model annotations.

@Eike: note for the review

1. The Derby testsuite was broken (as in "how did that ever work?!") Fixed it as part of this patch.

2. I had to increase net4j.db to 4.0.0 which caused a huge ripple effect. (Your version tool complained a lot ...). I hope I got everything right, but please be sure to check, if this is what you want wrt. versioning.
Comment 3 Eike Stepper CLA 2010-08-06 13:23:56 EDT
Created attachment 176055 [details]
Patch v2 - ready to be committed

Stefan, the org.eclipse.net4j.jms.tests manifest was missing in your patch. i added the 4.0->5.0 update there. Be sure that you have it in your workspace!
Comment 4 Stefan Winkler CLA 2010-08-06 13:50:00 EDT
Committed to HEAD ...

@Eike: Thanks for the heads up. I don't know where I lost that project in my workspace ...
Comment 5 Eike Stepper CLA 2011-06-23 03:39:57 EDT
Available in R20110608-1407