How to use a single sequence generator?

Hi,

I’m trying to port a legacy application build on top of Oracle. Now it uses a single sequence object in Oracle for all the different domains.
How can I achieve the same in the cuba-platform? Do I need to override a class somewhere to let all the domains point to the same sequence object in Oracle?

Regards,
Juan-José.

Hi Juan-José,

You can specify your own sequence for generation of Long and Integer identifiers if you extend the com.haulmont.cuba.core.app.NumberIdWorker bean and override its getSequenceName() method.