-->
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: Force hbm2ddl to output NULL for nullable values
PostPosted: Wed Jun 30, 2010 7:50 am 
Newbie

Joined: Wed Jun 30, 2010 7:38 am
Posts: 1
I'm trying to get hbm2ddl to generate a schema for MySQL that includes a property that is a nullable timestamp. On MySQL, timestamps are NOT NULL by default, so I need the output to contain

`CSEMAILVERIFIED` timestamp NULL DEFAULT NULL,

I've set 'not-null="false"' in my mapping, however hbm2ddl doesn't explicitly mark nullable fields as NULL, which causes the generated schema to fail when add "default=null" to the mapping (as `CSEMAILVERIFIED` timestamp DEFAULT NULL is invalid on MySQL). Is there a way to get hbm2ddl to explicitly mark nullable fields as NULL?


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.