wood burning stoves
The moose likes Object Relational Mapping and the fly likes JPA Annotation @Column + column defination Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "JPA Annotation @Column + column defination" Watch "JPA Annotation @Column + column defination" New topic

JPA Annotation @Column + column defination

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 761

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.. ?

Jigar Naik

Edvins Reisons
Ranch Hand

Joined: Dec 11, 2006
Posts: 364
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.
I agree. Here's the link: http://aspose.com/file-tools
subject: JPA Annotation @Column + column defination
jQuery in Action, 3rd edition