-->
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.  [ 3 posts ] 
Author Message
 Post subject: [Mapping] Setting a default value for a property.
PostPosted: Wed Aug 23, 2006 4:46 am 
Newbie

Joined: Wed Aug 23, 2006 4:38 am
Posts: 4
Hi all,
I'm using Hibernate 3 mapping and I have this curiosity:
for a column of database (a <property> of the mapping file) it's possible to apply a default value? I mean that if I not set the field of the Java class automatically it must been set to this default value.
I have found the "meta attribute" but it's not that I want to do.

Thank you a lot,

Luca.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 23, 2006 5:31 am 
Newbie

Joined: Wed Aug 23, 2006 4:38 am
Posts: 4
Resolved.
It's possible to set a default value with the

<meta attribute="default-value">VALUE</meta>

Luca.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 23, 2006 5:36 am 
Expert
Expert

Joined: Thu Sep 22, 2005 10:29 am
Posts: 285
Location: Almassera/Valencia/Spain/EU/Earth/Solar system/Milky Way/Local Group/Virgo Supercluster
How or where did you find that info?


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