Feature #2319
support for dialect-specific keywords in NameConverter
0%
History
#1 Updated by Ovidiu Maxiniuc almost 10 years ago
Because each SQL dialect has its own set of reserved keywords the NameConverter
must be aware and convert the names of the tables and fields so they won't collide with the keywords of any of the configured dialects for processed schema. The converted names of tables and columns are common to all dialects (Hibernates use same .hbm file regardless of the chosen dialect) so the generated ddl files will use the names elected at conversion time.
The NameConverter
should specify only common ANSI standard SQL keywords.
For each schema configured in p2j.cfg.xml
, except for standard
/_meta
, the NameConverter
should be reconfigured with the list of unallowable names that are extracted form each configured dialect (see the ddl-dialects
parameter of namespace
in the conversion configuration file). The P2JDialect
should declare some kind of public Set<String> getReservedKeywords()
that the NameConverter
will use to obtain the list of reserved keywords for the implementing dialect.
The special metadata (standard
/_meta
) and temp-table (_temp
) schemas that are using H2 dialect must be handled independently.
#2 Updated by Eric Faulhaber about 8 years ago
Ovidiu, AFAIK, you implemented this, right? Is there any reason to keep this task open?
#3 Updated by Ovidiu Maxiniuc about 8 years ago
I think not. At this moment we have no field/keywords collisions and stable schemas for all supported dialects.