Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Why is the word DISPLAY handled as a reserved word(reserved words in generate entities from tables)
Why is the word DISPLAY handled as a reserved word [message #1735260] Thu, 16 June 2016 16:21 Go to next message
Luis Muñoz is currently offline Luis MuñozFriend
Messages: 5
Registered: July 2009
Junior Member
Generating an entity from an Oracle table with a column named 'display' makes the name attribute of the @Column annotation to be escaped.

@Column(name="\"DISPLAY\"", length=2000)
private String display;


I couldn't find any reference to the word "display" as a reserved word.
Can someone please explain this behavior?

Best
Luis
Re: Why is the word DISPLAY handled as a reserved word [message #1735274 is a reply to message #1735260] Thu, 16 June 2016 20:18 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
Dali uses the Data Tools Platform (DTP) plug-in to determine whether a particular word is a reserved word for the associated database. The reserved words are listed in the database platform's .xmi file. This file is in the database platform's plug-in jar.

For example:
You can find what DTP considers the reserved words for Oracle 11 in the file
    runtime/vendors/Oracle_11/Oracle_11.xmi

and this file is in the plugin jar
    org.eclipse.datatools.enablement.oracle.dbdefinition_1.1.0.201512142037

The reserved words (keywords) are listed at the end of this file, in the SQLSyntaxDefinition XML element.

In my Eclipse installation, the Oracle list includes "DISPLAY" as a reserved word. My experience is that these lists cannot be trusted.... You can try filing a bug against DTP; but I think the DTP project has one foot in the grave....
Re: Why is the word DISPLAY handled as a reserved word [message #1735278 is a reply to message #1735274] Thu, 16 June 2016 21:51 Go to previous messageGo to next message
Luis Muñoz is currently offline Luis MuñozFriend
Messages: 5
Registered: July 2009
Junior Member
Hi Brian,
Thanks for your excellent answer. I wonder if this is related to compatibility with other database vendors. There's a DISPLAY keyword in DB2.

If DTP plugin is on its way to "the backyard of the silent" ( Razz ), which is its better replacement ?

Best
Luis
Re: Why is the word DISPLAY handled as a reserved word [message #1735281 is a reply to message #1735278] Thu, 16 June 2016 22:19 Go to previous messageGo to next message
Luis Muñoz is currently offline Luis MuñozFriend
Messages: 5
Registered: July 2009
Junior Member
I removed quoting and nothing happened...

Hibernate generated fields with escaping : dto0_."DISPLAY"
without escaping: dto0_.DISPLAY

Oracle version is 11g.

Luis
Re: Why is the word DISPLAY handled as a reserved word [message #1735285 is a reply to message #1735278] Fri, 17 June 2016 01:16 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
Quote:
I wonder if this is related to compatibility with other database vendors. There's a DISPLAY keyword in DB2.


Well, there is a separate list for every type of database; so the Oracle list is not supposed to include any DB2-specific reserved words. I'm guessing it is a copy/paste error or someone just took the biggest list of SQL reserved words to be found and never took the time to trim it down.

Quote:

If DTP plugin is on its way to "the backyard of the silent" ( Razz ), which is its better replacement ?


As things stand, there is no replacement. And the fading of DTP threatens the viability of Dali. Dali would have to be changed to go directly to the various databases, via JDBC instead of DTP. This is possible, but it would take time.

I guess this is one of the downsides of an open source ecosystem....
Re: Why is the word DISPLAY handled as a reserved word [message #1735286 is a reply to message #1735281] Fri, 17 June 2016 01:21 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
Luis Muñoz wrote on Thu, 16 June 2016 18:19
I removed quoting and nothing happened...

Hibernate generated fields with escaping : dto0_."DISPLAY"
without escaping: dto0_.DISPLAY

Oracle version is 11g.

Luis


As long as the name is not a reserved word (or have any special characters etc.), you do not need to quote it. Dali added the quotes because DTP indicated the name was a reserved word and, if it were a reserved word, you would have SQL errors at runtime. So: there should be no problem removing these particular quotes; but if you regenerate your entities, Dali will put them back.
Re: Why is the word DISPLAY handled as a reserved word [message #1735787 is a reply to message #1735285] Wed, 22 June 2016 17:13 Go to previous message
Luis Muñoz is currently offline Luis MuñozFriend
Messages: 5
Registered: July 2009
Junior Member
Yes, an ecosystem with peculiar survival rules.
Previous Topic:Don't see Diagram Editor in Mars
Next Topic:news.eclipse.org is shutting down.
Goto Forum:
  


Current Time: Sun Jun 24 09:37:05 GMT 2018

Powered by FUDForum. Page generated in 0.01755 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top