-
@Documented @Inherited @Retention(RUNTIME) @Target(TYPE) @Analyze("org.tentackle.buildsupport.TableNameAnalyzeHandler") public @interface TableNameAnnotation for the tablename of a PDO.The tablename can be modified by the options:
- mapSchema: if true, dots will be replaced by underscores
- prefix: prepends given string to each tablename
<wurbletProperties> <tablePrefix>pls</tablePrefix> ...and in the code:@TableName(value=/**/"md.ingotcategory"/**/, // @wurblet < Inject --string $tablename mapSchema=/**/false/**/, // @wurblet < Inject $mapSchema prefix=/**/""/**/) // @wurblet < Inject --string $tablePrefixMeans: all schemas get "pls" prepended (for example: td.message becomes plstd.message). Non-schema tables from the TT-framework (technical tables) remain in the default schema. This configuration is particularly useful for databases like Oracle that emulate schemas via extra users. As a result, the main user "pls" remains unchanged, transaction data goes to the "schema-user" plstd while the masterdata go to plsmd. The model, however, remains unchanged! It's just a configuration in pom.xml.With mapSchema=true and prefix="" all tables go to the default schema, while masterdata tables start with md_ and transactiondata with td_.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.StringvalueDetermines the tablename.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanmapSchemaDetermines whether schemas are allowed or mapped to simple table names.
If true, tablenames like "md.blah" are mapped to "md_blah".java.lang.StringprefixAdds a prefix to the tablename or schema.
-
-
-
-
mapSchema
boolean mapSchema
Determines whether schemas are allowed or mapped to simple table names.
If true, tablenames like "md.blah" are mapped to "md_blah". This is especially useful for databases that don't support schemas or provide only quirky workarounds (Oracke, MySQL, for example).- Returns:
- true if map to non-schema name
- Default:
- false
-
-