• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA Annotation @Column + column defination

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

There is a JPA Annotation @Column which has the attribute columnDefination



But then if my database does not support VARCHAR2 datatype my method for recreating schema will fail...

So is there any annotation in hibernate for defination of column which i can use for creating tables. As well as i can map my java datatype with database's data type.. ?

 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what you want to define here: columnDefinition is, by design, non-portable database specific DDL. The @Column annotation has a few attributes, for example, length, that you can use for portable customization.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic