Entity with SINGLE_TABLE inhertance and a UNIQUE attribute

Hi,
I design a base entiye for many of dictionary tables. Because of i want store all dictionary value to a single table.
Below is the source code of base entity:
image
In my understand ,the “code” field value only require keeping unique in a ‘DTYPE’ range.but i found that ,the ‘code’ field value rquire keeping unique in whole table due to:
image
Is it a right behavior ?Do i need to change my design?

Hi,
My explain is not clearly?
If this behavior is designed, then i will need some reworking.

Hello,
You can just modify the index to be composite:

create unique index XXX on YYY (CODE, DTYPE) where DELETE_TS is null;

And it will work fine for you.

Regards,

Hi,
Thanks very much ,this workaround is a good way.
And i have removed the UNIQUE annotation from my base entity as a workaround.
But i think that the generated db script should like you write. May be this a issue of Studio. @knstvk