cuba-platform / cuba

CUBA Platform is a high level framework for enterprise applications development
https://www.cuba-platform.com
Apache License 2.0
1.34k stars 221 forks source link

No validation for creation new user with existing login for HSQLDB #2973

Open maistrenkoIulia opened 4 years ago

maistrenkoIulia commented 4 years ago

Environment

Description of the bug or enhancement

knstvk commented 4 years ago

This is a known issue for HSQL and it stems from the fact that HSQL follows SQL standard when treating nulls in indexes but doesn't support partial indexes:

http://www.hsqldb.org/doc/1.8/guide/ch02.html

A row, in which the value for any of the UNIQUE constraint columns is NULL, can always be added to the table. So multiple rows can contain the same values for the UNIQUE columns if one of the values is NULL.

In other DBMS we use partial indexes (Postgres), triggers (MySQL) or the DBMS just doesn't conform to the standard and ignores nulls in unique indexes (MS SQL, Oracle).

We consider HSQL as prototype-only DB, so we can live with this issue.