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

Bug 352388

Summary: Handle database reserved keywords
Product: [Modeling] EMFT Reporter: Mike Cooper <mcooper>
Component: TexoAssignee: Martin Taal <mtaal>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: Future   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Mike Cooper CLA 2011-07-18 15:50:54 EDT
It would be nice if Texo somehow handled database reserved keywords.  When switching from Teneo to Texo I hit a few reserved mysql keywords ("interval" and "key") I used for attribute names in my ecore model.  These didn't show up as problems until runtime when I hit sql errors.

Ideally Texo should somehow tell hibernate to map the attribute/property names to have a specific prefix for each db attribute name.  i.e. stick "e_" or something before each variable name. 

If that's not possible, it would be nice if Texo at least warned about common reserved database keywords so these could be addressed at code gen time and not hidden until they are hit at runtime.
Comment 1 Martin Taal CLA 2012-08-23 08:45:34 EDT
This has been solved, see the new property of the epackage annotation to encode sql reserved words.