-->
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: Initializing components
PostPosted: Thu Aug 19, 2004 9:16 am 
Beginner
Beginner

Joined: Mon Nov 24, 2003 5:39 am
Posts: 26
Location: France
Is there any way to have Hibernate initialize a mapped class's components, even when the columns underneath are empty?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 20, 2004 8:55 am 
Senior
Senior

Joined: Fri Nov 21, 2003 5:55 am
Posts: 155
Your question is strange could you give us more details,?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 20, 2004 9:36 am 
Beginner
Beginner

Joined: Mon Nov 24, 2003 5:39 am
Posts: 26
Location: France
When you map a component to a class, the mapped component returns null when the component's mapped columns are empty. Here's how the Hibernate documentation explains this:

"When reloading the containing object, Hibernate will assume that if all component columns are null, then the entire component is null. This should be okay for most purposes. "

This is fine in some instances but not when you try to populate or retrieve data from your containing object through a beanwrapper. This is often done in web frameworks such as Spring.

I believe you should have the option to retrieve a non-null component even if the component columns are empty.


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.