java.util.set

JPA - How to persist java.util.Set through JPA?

I have a field aliases of type java.util.Set in one Entity. This Set doesn't denote any relationship to an Entity. Q1. How can I store this aliases field through JPA? Q2. How this field get stored in database? I think that for the database, this field is a multi-valued attribute. ...

Using sets in JDO

I have a model which contains a java.util.Set object as a member. How do I persist this using JDO? Specifically, how do I define the XML in the .jdo file? class MyClass { Set<String> data; private MyClass() { } } ...