-->
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: Folding child table into master table column_
PostPosted: Sun May 22, 2005 7:34 pm 
Newbie

Joined: Tue May 17, 2005 5:31 pm
Posts: 4
I have done the above trick a number of times previously to get performance enhancements when queries on the child table are unlikely.

Say for example that I have a table for rule configurations and the child table (or the idea that I need a child table) for parameters for these rules.

What I'd do if I did it by hand would be to have a class "Rule" and another called "Parameter" but I would serialize all parameters for a rule into a column of the rule table, elliminating the need for a "Parameter" column.

How would this be done in Hibernate? I've read the documentation and came across "UserType" which seems on the way but this doesn't seem to deal with collections. Would it be UserCollectionType which would be appropriate to serialize my "Parameter"s in to a "Rule" column?

Another complicating factory is that Oracle only allows 4000 digits in a VARCHAR2 column so that is 2000 serialized and hexcoded bytes. In my previous hand-coded classes my DAOs check whether we're over the limit and then serialize the data to a BLOB column instead but this is much slower of course.

Any ideas?


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.