Persistence @Column nullable = false can insert null

前端 未结 3 750
轮回少年
轮回少年 2021-01-18 08:08

I want to do this column can´t be null but when I insert in database one register values null this allows me inserted. I read documentation and I don´t know why doesn´t work

3条回答
  •  执念已碎
    2021-01-18 08:49

    if you directly do insert in database then Hibernate or any persistence provider would not ne able to control you. try to insert using persistence provider.

提交回复
热议问题