I have added a unique column and added message for violation check
IDX_APPOLL_USER_DETAILS_UNIQ_PHONE_NUMBER = Phone number already exists
in message.properties of web, portal and core modules but not getting this message.
In the log i am getting
"Caused by: org.eclipse.persistence.exceptions.DatabaseException:
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicata du champ ‘9538578696’ pour la clef 'IDX_APPOLL_USER_DETAILS_UNIQ_PHONE_NUMBER’
Error Code: 1062"
and in the postman I am getting
"{
“error”: “Server error”,
“details”: “”
}"
these messages.
but I want to show “Phone number already exists” as message to end user
Currently using cuba 6.8.2
It seems that you have a non-English locale enabled for your DB. In this case, you should provide a value for the cuba.uniqueConstraintViolationPattern application property. This property allows you to define a reaction to unique constraint violations depending on a DBMS locale and version.
I’m using HSQLDB and have English and Spanish locales enabled in the project properties, where should I add the personalized message? I have them inside the main message pack but it isn’t working.