Pessoal,
estou tentando fazer um relacionamento OneToMany através de mapeamento do hibernate, e gostaria de saber por que está dando o erro abaixo:
org.hibernate.MappingException: Could not determine type for: br.com.projeto.bean.ObjetoBean, for columns: [org.hibernate.mapping.Column(objeto)]
Abaixo seguem os beans e seus devidos mapeamentos:
//Bean responsável para vincular Objetos do sistema ao perfil.
@Entity
@Table (name="objetos_perfil_web")
public class ObjetosPerfilBean {
@Id @GeneratedValue
private Long id;
@OneToOne
@JoinColumn(name="perfil_web_id")
private PerfilBean perfil;
@OneToMany
@JoinColumn(name="objeto_web_id", referencedColumnName="id")
private List<ObjetoBean> objeto;
getters and setters
}
Observem que estou utilizando relacionamento unidirecional......
//Bean de objeto a ser vinculado ao bean objetos por perfil acima.
@Entity @Table(name="objeto_web")
public class ObjetoBean {
@Id @GeneratedValue
private Long id;
private String descricao;
getters and setters
}
Me baseio por esse briefing: http://en.wikibooks.org/wiki/Java_Persistence/OneToMany
mas está dando erro... AJUDA!!!!!!!!!!!!