-->
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.  [ 1 post ] 
Author Message
 Post subject: hbm2java and Firebird Bug?
PostPosted: Tue Jan 14, 2014 3:57 am 
Newbie

Joined: Mon Jan 13, 2014 10:17 am
Posts: 5
Hi,

im using hbm2java to generate classes and mappings from an existing Firebird 2.5 database.

After generation I've tried to auto generate tables etc. into an empty database directly via hibernate (Hbm2ddl Auto = update)

That wasn't successfull because i use few fields als "BLOB SUB_TYPE 1" (aka BLOB SUB_TYPE_TEXT) that is for large strings.

the generated mapping sais "string" for thats not correct because the genereated sql results in varchar(0) an that is wrong - the table failed to create.

Looking at the FirebirdDialect class (that extended from InterbaseDialect) the right type for BLOB SUB_TYPE 1 would be CLOB.

so I've changed from

Quote:
<property generated="never" lazy="false" name="description" type="string">
<column length="0" name="DESCRIPTION">
</column>
</property>


to

Quote:
<property generated="never" lazy="false" name="description" type="clob">
<column length="0" name="DESCRIPTION">
</column>
</property>


and it succeeded to create the table.

Is there a speacial reason for that or can i set it in the configuration before generating classes and mappings from db?

Thanks.


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

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.