Rate this page:
How are database tables named?
Let's take the example of an entity with class name , belonging to a plugin with a key of .
The table name for this entity will be AO_28BE2D_MY_OBJECT.
It has three parts:
3. is the upper case translation of the entity class name . The Active Object plugin chooses upper case to ease compatibility with multiple databases. This is not the default behavior of the Active Objects library so be wary about this when reading the Active Objects documentation.
You can also specify the table name you'd like to use through the annotation. The value defined in the annotation will still be processed in the same way a class name would be processed. So if you set the value as , the table will be named AO_28BE2D_MY_OBJECT.
The AO table names will in most cases contain the last 6 characters the MD5-hash of the Atlassian plugin key, but when building with the some additional rules apply. Under the hood it is not the Atlassian plugin key but the MD5 hash of the bundle manifest's Bundle-SymbolicName (generated by BND) that provides the AO table name. While the Bundle-SymbolicName defaults to using the Atlassian plugin key, BND may perform certain optimizations, as fully described here. Developers who are switching from to should pay special attention to these optimizations and set the AO namespace explicitly to avoid resetting the AO tables accidentially.
Table names (once transformed) can not be more than 30 characters long. This is an Oracle restriction that is take in account whatever database one works with to provide consistency across all supported databases.
Rate this page: