File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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: 751

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:
subject: JPA Annotation @Column + column defination
Similar Threads
Oracle 10g Clob Datatype Cannot Insert data
How JPA persist a boolean
validate an excelsheet entries using java code
can we use JSTL in Javascrpt
Oracle sql exception: