-->
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: SchemaExport and default values for columns
PostPosted: Mon Oct 04, 2004 6:45 pm 
Regular
Regular

Joined: Mon Sep 20, 2004 8:42 am
Posts: 58
Location: Boston, US
Does Hibernate support expressing default values for certain columns to be specified in the mapping file such that the DDL also had them when SchemaExport is run.

I can initialize the member variable in my domain object to the default value or use a UserType however I would rather put them in my mapping file for a couple of reasons

- It will be along with related meta attributes like length, index, type etc. that are used to generate the DDL and more importantly

- not all my data read/insert is going to be through the application using Hibernate as the O/R mapper. We need to import bulk data from an external source using tools like Informatica. Placing the same default values in this tool is also possible but would be duplicate information that needs to be synch'ed and maintained.

Thanks,
Sanjiv


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.