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: Persisting a Map<String, .Collection<String>>?
PostPosted: Wed Mar 05, 2008 6:22 pm 
Newbie

Joined: Tue Mar 04, 2008 12:12 am
Posts: 7
Location: Wellington, New Zealand
What is the best way to persist this? given tat I cant change the java-code?
(It 'belongs' to someone else,and they want it to work in a very specific way).

Thanks

Nick


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 05, 2008 7:00 pm 
Newbie

Joined: Tue Mar 04, 2008 12:12 am
Posts: 7
Location: Wellington, New Zealand
To clarify,
There is no reason I cant change other Java code,
I was thinking of writing a custom type, or a custom collection, but I cant change domain object itself.

a side-note, I'm stuck with java 1.4, so nothing that requires annotations.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 06, 2008 6:34 pm 
Newbie

Joined: Tue Mar 04, 2008 12:12 am
Posts: 7
Location: Wellington, New Zealand
Cold someone please tell me, or point me to an example of a hibernate user type (or collection, whatever) that stores a map of string/sets?

I was thinking of writing a custom type, that would be sed as a property, so the ID is stored in the parent table, and a separate table, or tables, is/are used to store the String/Set mapping, and the contents of the set.

However, im not sure how to go about defining extra tables in the custom type java. (nor am I sure how to use a native ID in that context)

Thank you.


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.