Re: JPA and Collection valued Properties
Kenneth P. Turvey wrote:
This isn't really a problem for me, but it seems to be missing from the
text I have on the Java Persistence API. I have an entity that has a
field that is a collection, like so:
Which text are you referring to? I think it would help us to know what
work you've done on this yourself already. One Google search and two
clicks, I found this, which strongly seems to imply that a collection
will be (or can be) persisted:
<https://glassfish.dev.java.net/javaee5/persistence/persistence-example.html>
QUOTE:
"The Customer entity is mapped to the CUSTOMER table, and looks like this:
@Entity
public class Customer {
private int id;
private String name;
private Collection<Order> orders;
ENDQUOTE
So there seems to be a couple of other tags in there too (later on in
the class def). I confess I didn't read the whole thing. BTW, here was
the first link Google gave, which is how I found the one above.
<http://java.sun.com/javaee/overview/faq/persistence.jsp>