I want to make validation over employee userName
In the entity level for Employee table I've added ALT Key over UserName
and then on the entity level I've created Unique key validator and used this ALT Key
when I insert new employee if I inserted duplicated UserName validation will fire.
If I have edited old employee record that the userName was null and I'ved updated it to an existing userName validation won't fire.
how to fire unique key validation if editing an existing record with null user name.
the unique constraint is added one the table on the data base and added on the entity level
the unique can't be added Deferred Execution to Transaction Level as this area is disable when I choose unique constraint. and the unique not fired when I edit null field when I edit new filed or field that has value the unique is fired I don't know where is the problem
This example contains Script.sql, and this file contains script for employee table
The email column is unique and not mandatory
Double click employeeView1
Press Add to add new Employee
Add the Id , Last Name , "Sking" for the email and add other required fields
constrain will fire and error message will appear
Double click employeeView1 again
Go to EmployeeId 555
Change the email from null to "SKING"
"oracle.jbo.DMLConstraintException" will raise This means that the unique constraint is not fired when updating null value. But when inserting or updating value that is not null the unique constraint is fired normally.