On [embeddables section|http://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/Hibernate_User_Guide.html#embeddables] of the documentation, there is the following example:
{code:java} @Embeddable public class Address {
private String line1;
private String line2;
@Embedded private ZipCode zipCode;
...
@Embeddable public static class Zip {
private String postalCode;
private String plus4;
... } } {code}
Note that the embeddable class is named ` {{ Zip ` }} , whereas the type of the embedded field of ` {{ Address ` }} is ` {{ ZipCode ` }} . I guess both should have the same name. |
|