Zdravim konferenciu,

pouzivam Hibernate zatial celkom uspesne, ale narazil som na problem, mam definovany nasledovny objekt House:

public class House extends BaseObject {

   private Long id;

   private String name = null;

   private String address = null;

   public House() {}

   @OneToMany (fetch = FetchType.LAZY, cascade = CascadeType.ALL)
   @JoinColumn(name = "fk_house_id")
   private List<HouseContact> houseContacts;

   public void addHouseContact(HouseContact houseContact) {
       if (this.houseContacts == null) {
           houseContacts = new ArrayList<HouseContact>();
       }
       this.houseContacts.add(houseContact);
       houseContact.setHouse(this);
   }

   public List<HouseContact> getHouseContacts() {
       return houseContacts;
   }

   public void setHouseContacts(List<HouseContact> houseContacts) {
       this.houseContacts = houseContacts;
   }

   ......
}

a pri vstupe na stranku to vypisuje nasledovnu chybu:

Invocation of init method failed; nested exception is org.hibernate.MappingException: Could not determine type for: java.util.List, for columns: [org.hibernate.mapping.Column(houseContacts)]

neviete kde moze byt problem?

dakujem

Ivan

Odpovedet emailem