HHH-4679 Make sure @AssociationOverride support the dot notation.

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18523 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Scott Marlow 2010-01-12 20:19:32 +00:00
parent e95ae257d1
commit d86de21e15
1 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,45 @@
package org.hibernate.test.annotations.override;
import org.hibernate.test.annotations.override.Employee;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import java.util.Collection;
@Entity
public class PhoneNumber {
@Id
int id;
public void setId(int id) {
this.id = id;
}
int number;
@ManyToMany(mappedBy = "contactInfo.phoneNumbers", cascade = CascadeType.ALL)
Collection<Employee> employees;
public Collection<Employee> getEmployees() {
return employees;
}
public void setEmployees(Collection<Employee> employees) {
this.employees = employees;
}
public int getNumber() {
return number;
}
public void setNumber(int number) {
this.number = number;
}
public int getId() {
return id;
}
}