I am using objectdb 2.8.3, I have a Entity class with a column that is declared as @Column(unique = true, nullable = false, length = 16) but when i m trying to insert a string for that column with a string that has more than 16 character, not able to get any error or exception from ObjectDB. It should give an error for exceeding the limit. But dose not throwing any error or exception so its very difficult to validate the column string length. Please find the below project and objectdb file.
@Column length is not working.
i think implementation of lifecycle event callback is expensive for check the length of a field. Is there any other way?
If by expensive you mean slow then it is not that expensive.
You can use external validation libraries, but they will not be faster.