java - Long column size in JPA/Hibernate -


@id @generatedvalue(strategy = generationtype.identity) @basic(optional = false) @column(name = company_id , length = 10) private long id; 

enter image description here

in sql gets converted bigint(20),what if want int(11) or how give specific size long field??

you can use columndefinition inside @column()

 @column(columndefinition="bigint(20)") 

Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -