-->
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.  [ 2 posts ] 
Author Message
 Post subject: Can i get a zero length mapped array instead of null?
PostPosted: Wed May 17, 2006 9:55 pm 
Newbie

Joined: Wed May 17, 2006 9:46 pm
Posts: 3
If i have a class with an array property of size 0 it becomes null after a save/load with hibernate. Is there a way to get hibernate to construct me a zero length array instead of null or do i have to munge the object by hand after i get it back?

Thanks in advance.

Matt


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 18, 2006 4:48 am 
Regular
Regular

Joined: Wed Aug 25, 2004 6:23 am
Posts: 91
I don't think that you can do it entirely from the mapping but you could specify your own class in the array access attribute that created zero length arrays instead of setting a null value.


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