-->
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.  [ 4 posts ] 
Author Message
 Post subject: How to set column type to be BIGINT OR TINYINT ?
PostPosted: Sun Oct 31, 2004 10:15 am 
Regular
Regular

Joined: Mon Aug 02, 2004 9:33 am
Posts: 69
Hibernate version:2.1.6

Mapping documents:

<id
name="id"
column="ID"
type="int"
unsaved-value="none"
>


Name and version of the database you are using:MySQL 4.0.21

Hi guys,

I am using xDoclet to export schema into MySQL DB like below:

<target name="schemaexport" depends="generate.jar" description="Exports all hbm.xml files in {src.dir}">
<echo message="Run the schema export for all hbm.xml files in ${src.dir}"/>
<path id="schemaexport.classpath">
<fileset dir="${web.dir}/WEB-INF/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${src.dir}/catalog/model/businessobject">
<include name="*.jar"/>
</fileset>
</path>

<taskdef
name="schemaexport"
classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="schemaexport.classpath">
</taskdef>

<schemaexport
properties="${src.dir}/catalog/hibernate.properties"
quiet="no"
text="no"
drop="no"
output="${src.dir}/catalog/schema-export.sql"
>
<fileset dir="${src.dir}">
<include name="**/*.hbm.xml"/>
</fileset>
</schemaexport>
</target>

But I want my id type to be tinyint or bigint in some table. As in the mapping document, I set the type to int but in MySql DB, it's int(11). Pls help, Thanks !

prettyhandling


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 31, 2004 1:18 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
sql-type


Top
 Profile  
 
 Post subject: sql-type
PostPosted: Sun Oct 31, 2004 8:36 pm 
Regular
Regular

Joined: Mon Aug 02, 2004 9:33 am
Posts: 69
michael wrote:
sql-type


Hi,

U mean I gotta implement like this post?

http://forum.hibernate.org/viewtopic.ph ... 64#2220464


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 31, 2004 9:23 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
No, just set sql-type on your property. Please read the manual.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.