Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Oracle Create Table cdo_commit_infos
[CDO] Oracle Create Table cdo_commit_infos [message #555377] Thu, 26 August 2010 13:06 Go to next message
Eclipse UserFriend
Originally posted by: info.dav85.de

Hi,

I'am trying to implement the Oracle DBAdapter like in the bundle
org.eclipse.net4j.db.mysql. I integrated the jdbc driver into my bundle.
All works fine. Now the framework will create the tables in the database.

While executing the SQL-String

"CREATE TABLE cdo_commit_infos (commit_time NUMBER, branch_id INTEGER,
user_id VARCHAR(255), comment VARCHAR(255))"

i got an exception with the message "ORA-00904: string: invalid
identifier". The problem is, that the table contains the coloumn
"comment". And "comment" is a reserved word in oracle. I found the
defintion of this coloumn in the class CDODBSchema:

public static final IDBField COMMIT_INFOS_COMMENT = //
COMMIT_INFOS.addField("comment", DBType.VARCHAR); //$NON-NLS-1$

Is there a way to get a another name for this coloumn if it is a
reserved name in a database?

Thank You!
David
Re: [CDO] Oracle Create Table cdo_commit_infos [message #555426 is a reply to message #555377] Thu, 26 August 2010 14:30 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000103080407010702000107
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi David,

Quite some time ago we moved the "name mangling " from the IDBAdapter level to the IMappingStrategy. Stefan and I have discussed several enhancements to the mapping and naming mechanism, including the use of quoted SQL identifiers.

In the meantime I suggest that you file a small bugzilla requesting the "comment" field be renamed to "commit_comment".

Cheers
/Eike

Contact: http://www.esc-net.de Blogger <http://thegordian.blogspot.com>Twitter <http://twitter.com/eikestepper>Linkedin <http://de.linkedin.com/in/eikestepper>Xing <http://www.xing.com/profile/Eike_Stepper>
Article: What exactly is inside that p2 repository? < http://thegordian.blogspot.com/2010/05/what-exactly-is-insid e-that-p2.html>

I'm going to Eclipse Summit Europe 2010 <http://www.eclipsesummit.org/>



Am 26.08.2010 15:06, schrieb David Hein:
> Hi,
>
> I'am trying to implement the Oracle DBAdapter like in the bundle org.eclipse.net4j.db.mysql. I integrated the jdbc driver into my bundle. All works fine. Now the framework will create the tables in the database.
>
> While executing the SQL-String
>
> "CREATE TABLE cdo_commit_infos (commit_time NUMBER, branch_id INTEGER, user_id VARCHAR(255), comment VARCHAR(255))"
>
> i got an exception with the message "ORA-00904: string: invalid identifier". The problem is, that the table contains the coloumn "comment". And "comment" is a reserved word in oracle. I found the defintion of this coloumn in the class CDODBSchema:
>
> public static final IDBField COMMIT_INFOS_COMMENT = //
> COMMIT_INFOS.addField("comment", DBType.VARCHAR); //$NON-NLS-1$
>
> Is there a way to get a another name for this coloumn if it is a reserved name in a database?
>
> Thank You!
> David

--------------000103080407010702000107
Content-Type: multipart/related;
boundary="------------070301090603050208080607"


--------------070301090603050208080607
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi David,<br>
<br>
Quite some time ago we moved the "name mangling
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
" from the IDBAdapter level to the IMappingStrategy. Stefan and I
have discussed several enhancements to the mapping and naming
mechanism, including the use of quoted SQL identifiers.<br>
<br>
In the meantime I suggest that you file a small bugzilla requesting
the "comment" field be renamed to "commit_comment".<br>
<br>
<!--WISESTAMP_SIG_38072_START--><span style="color: black;">
<div dir="ltr">
<div>Cheers<br>
/Eike<br>
<br>
</div>
<div style="padding: 5px 0pt; font-family: arial,sans-serif;
font-size: 13.3px;"><span style="color: gray;">Contact: <a
href="http://www.esc-net.de">http://www.esc-net.de</a></span>
<a href="http://thegordian.blogspot.com" style="padding: 0pt
2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part1.02060807.06030708@esc-net.de" alt="Blogger"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a><a
href="http://twitter.com/eikestepper" style="padding: 0pt
2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part2.02040800.00090804@esc-net.de" alt="Twitter"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a><a
href="http://de.linkedin.com/in/eikestepper" style="padding:
0pt 2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part3.07080801.09050403@esc-net.de"
alt="Linkedin" style="vertical-align: middle;
padding-bottom: 5px;" border="0" height="16" width="16"></a><a
href="http://www.xing.com/profile/Eike_Stepper"
style="padding: 0pt 2px; color: blue; font-size: 10pt;"
_service=""><img
src="cid:part4.08080003.02080303@esc-net.de" alt="Xing"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a></div>
<div style="color: gray; font-size: 13.3px; padding-bottom:
5px;">Article: <span style="color: blue; text-decoration:
underline;"><a
href=" http://thegordian.blogspot.com/2010/05/what-exactly-is-insid e-that-p2.html"
undefined="">What exactly is inside that p2 repository?</a></span></div>
<div><br>
<a href="http://www.eclipsesummit.org/"><img
src="cid:part5.07050507.00010000@esc-net.de" alt="I'm
going to Eclipse Summit Europe 2010" border="0"
height="100" width="130"></a>
<br>
<br>
</div>
</div>
</span><!--WISESTAMP_SIG_38072_END--><br>
<br>
Am 26.08.2010 15:06, schrieb David Hein:
<blockquote cite="mid:i55osf$kd9$1@build.eclipse.org" type="cite">Hi,
<br>
<br>
I'am trying to implement the Oracle DBAdapter like in the bundle
org.eclipse.net4j.db.mysql. I integrated the jdbc driver into my
bundle. All works fine. Now the framework will create the tables
in the database.
<br>
<br>
While executing the SQL-String
<br>
<br>
"CREATE TABLE cdo_commit_infos (commit_time NUMBER, branch_id
INTEGER, user_id VARCHAR(255), comment VARCHAR(255))"
<br>
<br>
i got an exception with the message "ORA-00904: string: invalid
identifier". The problem is, that the table contains the coloumn
"comment". And "comment" is a reserved word in oracle. I found the
defintion of this coloumn in the class CDODBSchema:
<br>
<br>
public static final IDBField COMMIT_INFOS_COMMENT = //
<br>


Re: [CDO] Oracle Create Table cdo_commit_infos [message #556241 is a reply to message #555426] Tue, 31 August 2010 12:40 Go to previous message
Stefan Winkler is currently offline Stefan WinklerFriend
Messages: 307
Registered: July 2009
Location: Germany
Senior Member
Future readers note: the Bug has been processed as
323791: Column comment in cdo_commit_infos
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=323791)
and committed to HEAD yesterday.

Cheers,
Stefan


Am 26.08.2010 16:30, schrieb Eike Stepper:
> Hi David,
>
> Quite some time ago we moved the "name mangling " from the IDBAdapter
> level to the IMappingStrategy. Stefan and I have discussed several
> enhancements to the mapping and naming mechanism, including the use of
> quoted SQL identifiers.
>
> In the meantime I suggest that you file a small bugzilla requesting
> the "comment" field be renamed to "commit_comment".
>
> Cheers
> /Eike
>
> Contact: http://www.esc-net.de Blogger
> <http://thegordian.blogspot.com>Twitter
> <http://twitter.com/eikestepper>Linkedin
> <http://de.linkedin.com/in/eikestepper>Xing
> <http://www.xing.com/profile/Eike_Stepper>
> Article: What exactly is inside that p2 repository?
> < http://thegordian.blogspot.com/2010/05/what-exactly-is-insid e-that-p2.html>
>
> I'm going to Eclipse Summit Europe 2010 <http://www.eclipsesummit.org/>
>
>
>
> Am 26.08.2010 15:06, schrieb David Hein:
>> Hi,
>>
>> I'am trying to implement the Oracle DBAdapter like in the bundle
>> org.eclipse.net4j.db.mysql. I integrated the jdbc driver into my
>> bundle. All works fine. Now the framework will create the tables in
>> the database.
>>
>> While executing the SQL-String
>>
>> "CREATE TABLE cdo_commit_infos (commit_time NUMBER, branch_id
>> INTEGER, user_id VARCHAR(255), comment VARCHAR(255))"
>>
>> i got an exception with the message "ORA-00904: string: invalid
>> identifier". The problem is, that the table contains the coloumn
>> "comment". And "comment" is a reserved word in oracle. I found the
>> defintion of this coloumn in the class CDODBSchema:
>>
>> public static final IDBField COMMIT_INFOS_COMMENT = //
>> COMMIT_INFOS.addField("comment", DBType.VARCHAR); //$NON-NLS-1$
>>
>> Is there a way to get a another name for this coloumn if it is a
>> reserved name in a database?
>>
>> Thank You!
>> David
Previous Topic:clone as snychronized
Next Topic:Re: Binding of generics' type parameters
Goto Forum:
  


Current Time: Thu Apr 25 23:56:31 GMT 2024

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

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

Back to the top