db-jdo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gang Liu <gangliu...@yahoo.com>
Subject Re: OR mapping for JDO2.0
Date Sat, 26 May 2012 16:51:19 GMT
Matthew

Thank you very much

Will try

Tim

Sent from my iPhone

On May 26, 2012, at 5:51 AM, Matthew Adams <matthew@matthewadams.me> wrote:

> JDO doesn't support collections of collections, maps of collections,
> etc.  An easy workaround is to define a class that contains a
> List<String>, like this:
> 
> public class StringList {
>  List<String> list;
> 
>  // ctors, List<String> delegate methods, etc
> }
> 
> Then your #1 becomes List<StringList>.  For #2, you could define
> 
> public class StringListList {
>  List<StringList> list;
> 
>  // ctors, List<StringList> delegate methods, etc
> }
> 
> and then use Map<StringListList,String>.
> 
> -matthew
> 
> On Fri, May 25, 2012 at 7:25 PM, Gang Liu <gangliutim@yahoo.com> wrote:
>> Hi,
>> 
>> I have 2 use cases and hope someone can give some ideas:
>> 
>> #1 how to write mapping file if a member variable in a class is List<List<String>>
>> #2. how to write mapping file if a member variable in a class is Map<List<List<String>>,String>
>> 
>> thanks
>> 
>> Tim
> 
> 
> 
> -- 
> @matthewadams12
> mailto:matthew@matthewadams.me
> skype:matthewadams12
> yahoo:matthewadams
> aol:matthewadams12
> google-talk:matthewadams12@gmail.com
> msn:matthew@matthewadams.me
> http://matthewadams.me
> http://www.linkedin.com/in/matthewadams

Mime
View raw message