How to change sequence name Id?

Hi,
Our platform is:
CUBA Platform version: 7.2.4
CUBA Studio plugin version: 13.2-191
IntelliJ version: CUBA Studio 2019.2

We encountered next error message when running the application because the sequence Id is too long for database restriction:

com.haulmont.cuba.core.global.RemoteException:
---
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.3.6-cuba): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00972: el identificador es demasiado largo

Error Code: 972
Call: create sequence seq_id_areavianants_SolicitudAcces increment by 100 start with 0 nocache minvalue 0
Query: DataModifyQuery(sql="create sequence seq_id_areavianants_SolicitudAcces increment by 100 start with 0 nocache minvalue 0")
---
org.eclipse.persistence.exceptions.DatabaseException: 
Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00972: el identificador es demasiado largo

Error Code: 972
Call: create sequence seq_id_areavianants_SolicitudAcces increment by 100 start with 0 nocache minvalue 0
Query: DataModifyQuery(sql="create sequence seq_id_areavianants_SolicitudAcces increment by 100 start with 0 nocache minvalue 0")
---
java.sql.SQLSyntaxErrorException: ORA-00972: el identificador es demasiado largo

---
oracle.jdbc.OracleDatabaseException: ORA-00972: el identificador es demasiado largo

Is there any possibility to change the sequence name Id assigned automatically by Cuba Studio for another shorter?.

Regards,
Xavier

Hi @xlorentep,

Take a look at the annotation @IdSequence. I don’t remember if you’ll need to manually create/edit the sequence name in your database scripts.

Regards,
Peterson.

Hi Peterson,
Thanks for your help.
You’re right, with @IdSequence we can assigna the desired name.

Regards,
Xavier

1 Like