Let say I have an entity MyEntity. The MyEntity has a list of strings
inside.
@Entity
@Table(name = "TABLE_A")
public class MyEntity implements Serializable {
@Id
private int myId;
private String myName;
private List<String> myList;
}
- How does openjpa stores instances of this class in the database? For
example does it create
one table and one record for each String in the myList ?
- What would be the behavior of the openjpa if I put OneToMany
relationship annotation to the myList.
I know what it does if the type of item in the list is a user-defined
class, but I don't know what happens if the items are Strings.
- What does openjpa do if I say this.myList = null; Does this remove all
the existing records ?
Thanks
Gul