Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352388 - Handle database reserved keywords
Summary: Handle database reserved keywords
Status: RESOLVED FIXED
Alias: None
Product: EMFT
Classification: Modeling
Component: Texo (show other bugs)
Version: Future   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Martin Taal CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-18 15:50 EDT by Mike Cooper CLA
Modified: 2012-08-23 08:45 EDT (History)
0 users

See Also:


Attachments

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