Added by (Berry) A.W. van Halderen, last edited by (Berry) A.W. van Halderen on Jun 05, 2007  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

For administration reasons you may want to have alternate naming for the table and columns to be used in your database by the slide stores.  The default naming naming scheme of the slide tables and columns is fixed, however you can add a prefixing scheme.  This allows you to define a prefix which is added in front of every table and column name used by slide.  In case you want an alternate naming, this can be used, and it can also solve clashes with different database versions.
Newer versions of the Oracle database may complain about the use of the OBJECT table name, for instance.

The prefixing scheme is currently only available for the MySQL41 and Oracle RDBMS Adapters!

In order to prefix the tables and columns, you can add a parameter to the nodestore, below the parameter were the database adaptor is defined. The name of the parameter
is table-prefix for the prefix to be used for tables, and column-prefix to be used for the columns. For example:

<nodestore classname="org.apache.slide.store.impl.rdbms.JDBCStore">
  ...
  <parameter name="adapter">org.apache.slide.store.impl.rdbms.MySql41RDBMSAdapter</parameter>
  <parameter name="table-prefix">slide_</parameter
  <parameter name="column-prefix">SLIDE_</parameter
  <parameter name="driver">com.mysql.jdbc.Driver</parameter>
  ...
</nodestore>

This instructs the MySQL database adapter to use "slide_" in front of every table name, and "SLIDE_" in front of every column name within those tables.
If you do not specify a table-prefix, it will default to an empty string, which means that the default table names are not used (since prefixing with an empty string is equivalent to not prefixing). The same yields for the column-prefix.

This feature has become available in the Hippo repository 1.2.12.