Bug 258541 - [JPA 2.0] support for delimited identifiers
Summary: [JPA 2.0] support for delimited identifiers
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 2.3 M5   Edit
Assignee: Brian Vosburgh CLA
QA Contact:
URL:
Whiteboard: JPA2.0
Keywords: plan
Depends on:
Blocks:
 
Reported: 2008-12-11 14:51 EST by Karen Butzke CLA
Modified: 2010-01-21 12:59 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2008-12-11 14:51:12 EST
see JPA 2.0 spec Section 2.13 Naming of Database Objects:

By default, the names of database objects are to be interpreted as undelimited identifiers.
It is possible to specify that all database identifiers in use for a persistence unit be treated as delimited identifiers by specifying the <delimited-identifiers/> element within the persistence-unit element of the persistence.xml file. If the <delimited-identifiers/>element is specified, it cannot be overridden.
Open Issue: Should this be in persistence-unit of the persistence.xml file or in the persistence-unit-defaults of the orm.xml file?

Alternatively, it is possible to specify on a per-name basis that a name for a database object is to be interpreted as a delimited identifier.
Using annotations, a name is specified as a delimited identifier by enclosing the name within double quotes, whereby the inner quotes are escaped, e.g., "\"like this\"".
Open Issue: Alternative escape characters.
Open Issue: What happens when <delimited-identifiers> is specified and individual annotations use escaped double quotes. Do the double-quotes appear in the name of the db identifier or not?
Open Issue: Do we also need to add annotation elements to specify use of delimited identifiers or is the escaped double quotes mechanism enough?
Comment 1 Brian Vosburgh CLA 2010-01-05 00:35:16 EST
Code checked into HEAD.