Bug 258541

Summary: [JPA 2.0] support for delimited identifiers
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: GeneralAssignee: Brian Vosburgh <brian.vosburgh>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: neil.hauge
Version: 2.1Keywords: plan
Target Milestone: 2.3 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard: JPA2.0

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.