|
Hibernate example source code file (ContactInfo.java)
The Hibernate ContactInfo.java source codepackage org.hibernate.test.annotations.manytomany; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Embeddable; import javax.persistence.ManyToMany; @Embeddable public class ContactInfo { // @ManyToOne // Address address; // Unidirectional List<PhoneNumber> phoneNumbers; // Bidirectional @ManyToMany(cascade= CascadeType.ALL) public List<PhoneNumber> getPhoneNumbers() { return phoneNumbers; } public void setPhoneNumbers(List<PhoneNumber> phoneNumbers) { this.phoneNumbers = phoneNumbers; } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate ContactInfo.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.