Hi,
I'm studying for the JPA certification and while reading a book I encountered the following:
If instead of a many-to-many relationship we had an @ElementCollection of some embeddable type in a Map, we would have to differentiate between the key and the value. We would do this by prefixing the attribute name with "key." or "value.", depending upon which of the embeddable types we were overriding. An element collection of embedded EmployeeInfo types, with the same key overrides as those in the relationship in Listing 5-17, would use the key prefixes:
But I could not understand how a relationship with a real entity could be replaced by this kind of relationship with embeddable types id there is no information about any collection table or any table within the embeddable. I'm kind confused about element collections, I don't know if it's the book that I've bought but it sounds weird sometimes. Does anyone know what the quote above could mean?
Feel free to ask me anything!
www.BlackBeltFactory.com/ui#!/ref=jmotta, SCJP 6, OCWCD JEE5, OCE EJB JEE6