Exception when use Scala type Int in Spring JPA

I want to add field payd: Int to the constructor to entity Hotel (from this Example spring-boot-scala).

@BeanProperty @(NotEmpty @field) var paid: Int,

Also I changed the default constructor

def this() = this(null, 0, null, null, null)

also changed the run method in DbPopulator class

(1 to 10).foreach(i => {
  hotelRepository.save(new Hotel(id=null, paid = i, name = s"Hotel $i", address = s"Address $i", zip = s"Zip $i"))

But there is an exception

Caused by:org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction

How to resolve it.