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: Best way to store bool[7] in the database
PostPosted: Wed Feb 04, 2009 10:21 pm 
Newbie

Joined: Wed Feb 04, 2009 5:53 pm
Posts: 5
What would be the best way to store an array of 7 booleans in a database using NHIbernate? String of zeros and ones? A byte?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 05, 2009 4:15 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Easiest way probably is map it as Serializable and put in a binary column. But then you can't read/change the values by plain sql. I would put it in a byte and define a IUserType to map it.

_________________
--Wolfgang


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.