Add prefix to cuba system tables

I saw that CUBA added a lot of system tables (starts with SYS_ and SEC_).

As I cant create a new instance in my oracle database. I would like to know if its possible to add some prefix to these tables (like CUB_ for example) in order to keep the tables organized between all other tables in my db instance.

1 Like

Hi Igor,

i would assume that this is not possible. Since CUBA uses JPA it falls under the same constraints. JPA in contrast to something like Hibernate native does not allow something like naming strategies to readjust the names defined in the entity classes (see here and here for more details).

Since CUBA defines the table names in the source code like in the User entity it is not possible to change it. Even the platform possibility to extend platform entities will not change that, because it will adjust the existing table instead of using the name of the extended entity.

But that’s just my two cents. Anyone else might have another idea.

Bye,
Mario

If this is really a showstopper, you can create a new database and use it as a main storage - all CUBA tables will be created there. Then add your existing database as an additional store and create entities in it. The downside is that Studio does not generate DDL for entities in additional stores, so you have to do it manually. And you will not be able to create references to platform entities, such as User or FileDescriptor (such ability is work in progress and will be available in 6.4).

Thanks for the answers.

I created a new user that doesnt have access to all others system tables. Only the cuba default and entities tables!