-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Want to generate CHAR(4) instead of VARCHAR(4)
PostPosted: Fri Jan 14, 2005 1:30 am 
Newbie

Joined: Fri Jan 14, 2005 1:25 am
Posts: 2
Location: Los Angeles
I have property defined by the xdoclet tags:
/**
* @hibernate.property
* type="com.zetools.wuwi.hibernate.usertype.PartnerStatusUserType"
* length="4"
* not-null="true"
* @return Returns the status.
*/

which generates appropriate xml:

<property
name="status" type="com.zetools.wuwi.hibernate.usertype.PartnerStatusUserType"
update="true"
insert="true"
access="property"
column="status"
length="4"
not-null="true"
/>

The PartnerStatusUserType is of Types.CHAR.

Generating the schema results in the type being char(1)
instead of char(4). We would prefer to use char over varchar
for this instance. I am using
net.sf.hibernate.tool.hbm2ddl.SchemaExportTask to generate the
Oracle schema.

How do we get char(4) into the generated Oracle schema?

Any clues or hints would be greatly appreciated.

Regards,

Earl


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 14, 2005 5:02 pm 
Newbie

Joined: Fri Jan 14, 2005 1:25 am
Posts: 2
Location: Los Angeles
As part of looking for a solution to a different problem, found the
magic xdoclet tag:

@hibernate.column name = "status" sql-type = "CHAR(4)" not-null="true"


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.