Syllaba Abou Ndiaye
Syllaba Abou Ndiaye

Reputation: 211

Spring boot Spring data mySql

My following entity generated an error when i add these attributes

@Size(min=1, max=6)
private String status; 
@Size(min=1, max=2)
private String vip;
@Size(min=1, max=2)
private String sensitive;

However when i delete these attributes everything is ok no error found. I don't know what's wrong with these attributes. Is someone have an idea to help?

enter image description here

the error: enter image description here

Upvotes: 0

Views: 32

Answers (2)

ACV
ACV

Reputation: 10562

That's because SENSITIVE is a SQL reserved keyword.

Upvotes: 2

Syllaba Abou Ndiaye
Syllaba Abou Ndiaye

Reputation: 211

Finaly i find the solution. the only attribute which generate the error is sensitive. I just rename the attribute to mySensitive and everything is ok now.

Upvotes: 0

Related Questions