openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@bea.com>
Subject RE: Escaping reserved words in generated sql?
Date Thu, 16 Nov 2006 17:40:55 GMT
We've historically always taken the approach of avoiding the word
altogether, rather than escaping the word.

It certainly wouldn't be difficult to modify DBDictionary to escape
reserved words instead of avoiding them, though.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: roger.keays [mailto:roger.keays@ninthavenue.com.au] 
> Sent: Thursday, November 16, 2006 3:07 AM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: Escaping reserved words in generated sql?
> 
> 
> 
> roger.keays wrote:
> > 
> >  {prepstmnt 17689439 INSERT INTO FB_BLOBS (contentType, 
> filename, size)
> > VALUES (?, ?, ?) 
> > 
> > If I execute the statement manually, quoting the "size" 
> token, it is okay.
> > 
> Not the best example I suppose, since 'size' isn't in the 
> default oracle
> DBdictionary. The following query, however, has the same 
> behaviour, even
> though 'comment' is in the OracleDictionary:
> 
> INSERT INTO FB_PRIVILEGES (comment, inheritable, level, role, type,
> username, item_uuid) VALUES (?, ?, ?, ?, ?, ?, ?)
> 
> -- 
> View this message in context: 
> http://www.nabble.com/Escaping-reserved-words-in-generated-sql
> --tf2642125.html#a7375647
> Sent from the open-jpa-dev mailing list archive at Nabble.com.
> 
> 

Mime
View raw message