This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "JPA Annotation @Column + column defination" Watch "JPA Annotation @Column + column defination" New topic
Author

JPA Annotation @Column + column defination

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
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.. ?


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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JPA Annotation @Column + column defination
 
Similar Threads
can we use JSTL in Javascrpt
How JPA persist a boolean
Oracle 10g Clob Datatype Cannot Insert data
Oracle sql exception:
validate an excelsheet entries using java code